aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-20 20:14:13 -0800
committerfriendica <info@friendica.com>2013-01-20 20:14:13 -0800
commitc9f10f41f4e3f2dd5f644fb8e97aef415de22f1d (patch)
treed6bed27a06285b69d7c555552bd9d604d1982a2e /mod/dirsearch.php
parent59eed70246e3e222e02410808736fb916acf798c (diff)
downloadvolse-hubzilla-c9f10f41f4e3f2dd5f644fb8e97aef415de22f1d.tar.gz
volse-hubzilla-c9f10f41f4e3f2dd5f644fb8e97aef415de22f1d.tar.bz2
volse-hubzilla-c9f10f41f4e3f2dd5f644fb8e97aef415de22f1d.zip
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.
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php8
1 files changed, 5 insertions, 3 deletions
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'];
+ }
}
}