]> git.mxchange.org Git - friendica.git/commitdiff
New from rebase
authorAdam Magness <adam.magness@gmail.com>
Mon, 20 Nov 2017 16:14:35 +0000 (11:14 -0500)
committerAdam Magness <adam.magness@gmail.com>
Mon, 20 Nov 2017 16:14:35 +0000 (11:14 -0500)
more adjustments after rebase

src/Model/GlobalContact.php
src/Model/User.php

index 44fbd64b6d1eb20c1163849b2ab335c098560adc..be8b28260dc8025e8aba7644d76032afe698eb46 100644 (file)
@@ -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 '';
        }
 }
index ec4d1013b4475c7ac00220f1605df2234a8f7f9f..01bcce28d9cf2c6ce046d038da5c03225004250f 100644 (file)
@@ -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) {