sforkowany z mirror/friendica
directory - use dba::select_first()
rodzic
e18f3844da
commit
d572738e95
|
@ -81,14 +81,12 @@ function directory_content(App $a)
|
||||||
$publish = ((Config::get('system', 'publish_all')) ? '' : " AND `publish` = 1 " );
|
$publish = ((Config::get('system', 'publish_all')) ? '' : " AND `publish` = 1 " );
|
||||||
|
|
||||||
|
|
||||||
$total = dba::inArray(
|
$cnt = dba::select_first("SELECT COUNT(*) AS `total` FROM `profile`
|
||||||
dba::p("SELECT COUNT(*) AS `total` FROM `profile`
|
|
||||||
LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
||||||
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "
|
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "
|
||||||
)
|
|
||||||
);
|
);
|
||||||
if (DBM::is_result($total)) {
|
if (DBM::is_result($cnt)) {
|
||||||
$a->set_pager_total($total[0]['total']);
|
$a->set_pager_total($cnt['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$order = " ORDER BY `name` ASC ";
|
$order = " ORDER BY `name` ASC ";
|
||||||
|
|
Ładowanie…
Reference in New Issue