Change called method names

- Add GlobalContact::getRandomUrl
- Rename Contact::getIdForURL
- Rename Diaspora::sendUnshare
- Remove unused parameter $self in Contact::terminateFriendship
This commit is contained in:
Hypolite Petovan 2017-11-19 17:03:39 -05:00
parent b92fc24ff0
commit ec02af593d
48 changed files with 133 additions and 133 deletions

View file

@ -895,7 +895,7 @@ class GlobalContact
intval($uid)
);
$location = formatted_location(
$location = Profile::formatLocation(
array("locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"])
);
@ -1002,4 +1002,16 @@ class GlobalContact
q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
}
}
public static function getRandomUrl() {
$r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s'
AND `last_contact` >= `last_failure`
AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH
ORDER BY rand() LIMIT 1",
dbesc(NETWORK_DFRN));
if (DBM::is_result($r))
return dirname($r[0]['url']);
return '';
}
}