aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-09-16 22:42:32 +0200
committerIgor Wiedler <igor@wiedler.ch>2010-09-16 22:42:32 +0200
commite35711ddde8f5e9f94d4b5145662877619ceecd4 (patch)
tree16b5b18a4c14860bccd591d4b8a0d7a2ab833868 /phpBB/search.php
parent4d5d50001d00390b8255da736e67e38d83c8bed5 (diff)
parent46810f874758516a8b5ce0fc680f05b612f70f60 (diff)
downloadforums-e35711ddde8f5e9f94d4b5145662877619ceecd4.tar
forums-e35711ddde8f5e9f94d4b5145662877619ceecd4.tar.gz
forums-e35711ddde8f5e9f94d4b5145662877619ceecd4.tar.bz2
forums-e35711ddde8f5e9f94d4b5145662877619ceecd4.tar.xz
forums-e35711ddde8f5e9f94d4b5145662877619ceecd4.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9609] Change header() calls setting HTTP status to send_status_line(). [ticket/9613] Slightly update language strings. [ticket/9613] Fix missing database part for unread posts search load switch. [ticket/9613] Implement a load switch for unread posts search feature. [ticket/9785] Allow users to request new passwords when board is disabled. [ticket/9644] Check $mode before calling user_notification() from submit_post()
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 9e54820c25..2a13e20477 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -61,10 +61,18 @@ if ($search_id == 'egosearch')
}
}
-// Search for unread posts needs user to be logged in if topics tracking for guests is disabled
-if ($search_id == 'unreadposts' && !$config['load_anon_lastread'] && !$user->data['is_registered'])
+// Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled
+if ($search_id == 'unreadposts')
{
- login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
+ if (!$config['load_unreads_search'])
+ {
+ $template->assign_var('S_NO_SEARCH', true);
+ trigger_error('NO_SEARCH_UNREADS');
+ }
+ else if (!$config['load_anon_lastread'] && !$user->data['is_registered'])
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
+ }
}
// Is user able to search? Has search been disabled?