Merge pull request #3449 from Hypolite/improvement/move-probe-to-src

Hotfix: Yet more global classes to escape
This commit is contained in:
Michael Vogel 2017-05-08 00:18:53 +02:00 committed by GitHub
commit d9f8fbeb4f

View File

@ -88,7 +88,7 @@ class Probe {
if (!is_object($xrd))
return false;
$links = xml::element_to_array($xrd);
$links = \xml::element_to_array($xrd);
if (!isset($links["xrd"]["link"]))
return false;
@ -254,7 +254,7 @@ class Probe {
public static function uri($uri, $network = "", $uid = 0, $cache = true) {
if ($cache) {
$result = Cache::get("probe_url:".$network.":".$uri);
$result = \Cache::get("probe_url:".$network.":".$uri);
if (!is_null($result)) {
return $result;
}
@ -300,7 +300,7 @@ class Probe {
// Only store into the cache if the value seems to be valid
if (!in_array($data['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
Cache::set("probe_url:".$network.":".$uri, $data, CACHE_DAY);
\Cache::set("probe_url:".$network.":".$uri, $data, CACHE_DAY);
/// @todo temporary fix - we need a real contact update function that updates only changing fields
/// The biggest problem is the avatar picture that could have a reduced image size.
@ -499,7 +499,7 @@ class Probe {
return $webfinger;
}
$xrd_arr = xml::element_to_array($xrd);
$xrd_arr = \xml::element_to_array($xrd);
if (!isset($xrd_arr["xrd"]["link"]))
return false;
@ -1172,7 +1172,7 @@ class Probe {
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1", intval($uid));
if (dbm::is_result($x) && dbm::is_result($r)) {
if (\dbm::is_result($x) && \dbm::is_result($r)) {
$mailbox = construct_mailbox_name($r[0]);
$password = '';
openssl_private_decrypt(hex2bin($r[0]['pass']), $password,$x[0]['prvkey']);