diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-03-18 12:02:33 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-03-18 12:02:33 -0400 |
commit | 8b13358ce33a1d3f88dedf2d50c650017614f418 (patch) | |
tree | f3c256fb748d21440ea19a25fd2232c626fc1122 /mod/directory.php | |
parent | 939c8d3c8d3dce18e136d9ddff5fb93f064c61c3 (diff) | |
parent | 09ed17df99dd3acebeba814ff19c43c6c4a512f8 (diff) | |
download | volse-hubzilla-8b13358ce33a1d3f88dedf2d50c650017614f418.tar.gz volse-hubzilla-8b13358ce33a1d3f88dedf2d50c650017614f418.tar.bz2 volse-hubzilla-8b13358ce33a1d3f88dedf2d50c650017614f418.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
replace split() by explode(); split is deprecated
lost changes to tinymce/bbcode
remove admin view of local directory
bug #337, call template_unescape() only at the end of template processing
queue optimisation - back off delivery attempts to once per hour after the first 12 hours.
* master:
Diffstat (limited to 'mod/directory.php')
-rwxr-xr-x | mod/directory.php | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/mod/directory.php b/mod/directory.php index 962188945..7f18bd026 100755 --- a/mod/directory.php +++ b/mod/directory.php @@ -25,10 +25,6 @@ function directory_post(&$a) { function directory_content(&$a) { - $everything = (($a->argc > 1 && $a->argv[1] === 'all' && is_site_admin()) ? true : false); - if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) - $everything = false; - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; @@ -52,12 +48,6 @@ function directory_content(&$a) { } $admin = ''; - if(is_site_admin()) { - if($everything) - $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory' . '">' . t('Normal site view') . '</a></div></li></ul>'; - else - $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory/all' . '">' . t('Admin - View all site entries') . '</a></div></li></ul>'; - } $o .= replace_macros($tpl, array( '$search' => $search, @@ -73,17 +63,14 @@ function directory_content(&$a) { $search = dbesc($search); $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); - $publish = ((get_config('system','publish_all') || $everything) ? '' : " AND `publish` = 1 " ); + $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 $publish AND `user`.`blocked` = 0 $sql_extra "); if(count($r)) $a->set_pager_total($r[0]['total']); - if($everything) - $order = " ORDER BY `register_date` DESC "; - else - $order = " ORDER BY `name` ASC "; + $order = " ORDER BY `name` ASC "; $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 LIMIT %d , %d ", |