diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dirsearch.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index a88db0a2c..4a44feb7d 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -148,10 +148,10 @@ function dirsearch_content(&$a) { // If &return_total=1, we count matching entries and return that as 'total_items' for use in pagination. // By default we return one page (default 80 items maximum) and do not count total entries - $logic = ((strlen($sql_extra)) ? 0 : 1); + $logic = ((strlen($sql_extra)) ? 'false' : 'true'); if($hash) - $logic = 1; + $logic = 'true'; if($dirmode == DIRECTORY_MODE_STANDALONE) { $sql_extra .= " and xchan_addr like '%%" . get_app()->get_hostname() . "' "; @@ -165,7 +165,7 @@ function dirsearch_content(&$a) { if($limit) $qlimit = " LIMIT $limit "; else { - $qlimit = " LIMIT " . intval($startrec) . " , " . intval($perpage); + $qlimit = " LIMIT " . intval($perpage) . " OFFSET " . intval($startrec); if($return_total) { $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and xchan_network = 'zot' and not ( xchan_flags & %d)>0 and not ( xchan_flags & %d )>0 and not ( xchan_flags & %d )>0 $safesql ", intval(XCHAN_FLAGS_HIDDEN), |