diff options
author | Friendika <info@friendika.com> | 2011-01-02 22:09:54 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-02 22:09:54 -0800 |
commit | d92659560b8edd0594b587103b43ad5bd5012639 (patch) | |
tree | f334d76dbd89093d8448e13e62f8b094159e576c /mod/directory.php | |
parent | de5495f90b0327f565888d6cae9b9ae9cfa2664f (diff) | |
download | volse-hubzilla-d92659560b8edd0594b587103b43ad5bd5012639.tar.gz volse-hubzilla-d92659560b8edd0594b587103b43ad5bd5012639.tar.bz2 volse-hubzilla-d92659560b8edd0594b587103b43ad5bd5012639.zip |
site config to force publish in site directory
Diffstat (limited to 'mod/directory.php')
-rw-r--r-- | mod/directory.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/directory.php b/mod/directory.php index e1c83f05e..b0cee76cb 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -39,16 +39,16 @@ function directory_content(&$a) { $search = dbesc($search); $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); + $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " ); - - $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra "); + $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "); if(count($r)) $a->set_pager_total($r[0]['total']); - $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra ORDER BY `name` ASC LIMIT %d , %d ", + $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra ORDER BY `name` ASC LIMIT %d , %d ", intval($a->pager['start']), intval($a->pager['itemspage']) ); |