Ensure that Red members never see the accursed "and nobody was found..." when you've put in an explicit address of a channel you know for certain exists.

This commit is contained in:
friendica
2013-01-20 20:14:13 -08:00
parent 59eed70246
commit c9f10f41f4
3 changed files with 128 additions and 91 deletions

View File

@@ -78,9 +78,11 @@ function dirsearch_content(&$a) {
$qlimit = " LIMIT $limit ";
else {
$qlimit = " LIMIT " . intval($startrec) . " , " . intval($perpage);
$r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where 1 $sql_extra");
if($r) {
$ret['total_items'] = $r[0]['total'];
if($return_total) {
$r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where 1 $sql_extra");
if($r) {
$ret['total_items'] = $r[0]['total'];
}
}
}