]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
Replace include/event function with method calls
[friendica.git] / mod / directory.php
index b8b0482127172fd38b4e178aa41a7f147cf4b9d6..f1e079d68180d96d696f7808c33b1a7bf33818ea 100644 (file)
@@ -81,12 +81,12 @@ function directory_content(App $a)
        $publish = ((Config::get('system', 'publish_all')) ? '' : " AND `publish` = 1 " );
 
 
-       $total = q("SELECT COUNT(*) AS `total` FROM `profile`
-                       LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
-                       WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "
+       $cnt = dba::selectFirst("SELECT COUNT(*) AS `total` FROM `profile`
+                               LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
+                               WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "
        );
-       if (DBM::is_result($total)) {
-               $a->set_pager_total($total[0]['total']);
+       if (DBM::is_result($cnt)) {
+               $a->set_pager_total($cnt['total']);
        }
 
        $order = " ORDER BY `name` ASC ";