From c9f10f41f4e3f2dd5f644fb8e97aef415de22f1d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 20 Jan 2013 20:14:13 -0800 Subject: 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. --- mod/dirsearch.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod/dirsearch.php') diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 07af90ffb..b3893afe7 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -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']; + } } } -- cgit v1.2.3