]> git.mxchange.org Git - friendica.git/commitdiff
fix page counter in directory module
authorrabuzarus <rabuzarus@t-online.de>
Sat, 3 Mar 2018 18:31:15 +0000 (19:31 +0100)
committerrabuzarus <rabuzarus@t-online.de>
Sat, 3 Mar 2018 18:31:15 +0000 (19:31 +0100)
mod/directory.php

index b8b0482127172fd38b4e178aa41a7f147cf4b9d6..e547e54b9f578c3a27a19c6b37384c5902513cfd 100644 (file)
@@ -81,9 +81,11 @@ 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 "
+       $total = dba::inArray(
+                       dba::p("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']);