From: Adam Magness Date: Mon, 20 Nov 2017 16:14:35 +0000 (-0500) Subject: New from rebase X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1eb2e541f6614390c4959de8d1386734f541a883;p=friendica.git New from rebase more adjustments after rebase --- diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 44fbd64b6d..be8b28260d 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -1054,15 +1054,23 @@ class GlobalContact } } - public static function getRandomUrl() { - $r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s' + /** + * @return string + */ + 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)); + dbesc(NETWORK_DFRN) + ); - if (DBM::is_result($r)) + if (DBM::is_result($r)) { return dirname($r[0]['url']); + } + return ''; } } diff --git a/src/Model/User.php b/src/Model/User.php index ec4d1013b4..01bcce28d9 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -17,6 +17,10 @@ require_once 'plugin.php'; */ class User { + /** + * @param object $uid user to remove + * @return void + */ public static function remove($uid) { if (!$uid) {