aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
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'];
+ }
}
}