mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
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:
parent
b92fc24ff0
commit
ec02af593d
48 changed files with 133 additions and 133 deletions
|
@ -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 '';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue