aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-01-21 21:25:50 -0800
committerHabeas Codice <habeascodice@federated.social>2015-01-21 21:25:50 -0800
commit6d291d880e14c0489277fd670f235bdb60bcfcd5 (patch)
tree7df0163c26cfd1629dba9bad517b6cddf4a66642
parent90fbfb313ee40735f7b8501fb6c5330a06aead5d (diff)
downloadvolse-hubzilla-6d291d880e14c0489277fd670f235bdb60bcfcd5.tar.gz
volse-hubzilla-6d291d880e14c0489277fd670f235bdb60bcfcd5.tar.bz2
volse-hubzilla-6d291d880e14c0489277fd670f235bdb60bcfcd5.zip
directory server dba sql fixes
-rw-r--r--mod/dirsearch.php6
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),