]> git.mxchange.org Git - friendica.git/blobdiff - mod/community.php
We got rid of two workerqueue queries, yeah!
[friendica.git] / mod / community.php
index 45326e291d01236b304b53e5614cefe8591e2778..b1995c70021752e9ff8727826e5f8bdecee7d610 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
-use \Friendica\Core\Config;
+use Friendica\App;
+use Friendica\Core\Config;
 
 function community_init(App $a) {
        if (! local_user()) {
@@ -9,7 +10,6 @@ function community_init(App $a) {
        }
 }
 
-
 function community_content(App $a, $update = 0) {
 
        $o = '';
@@ -68,14 +68,14 @@ function community_content(App $a, $update = 0) {
                                }
                                $previousauthor = $item["author-link"];
 
-                               if (($numposts < $maxpostperauthor) AND (sizeof($s) < $a->pager['itemspage'])) {
+                               if (($numposts < $maxpostperauthor) && (sizeof($s) < $a->pager['itemspage'])) {
                                        $s[] = $item;
                                }
                        }
                        if ((sizeof($s) < $a->pager['itemspage'])) {
                                $r = community_getitems($a->pager['start'] + ($count * $a->pager['itemspage']), $a->pager['itemspage']);
                        }
-               } while ((sizeof($s) < $a->pager['itemspage']) AND (++$count < 50) AND (sizeof($r) > 0));
+               } while ((sizeof($s) < $a->pager['itemspage']) && (++$count < 50) && (sizeof($r) > 0));
        } else {
                $s = $r;
        }