Author: rxu
Date: Mon Aug 17 14:25:04 2009
New Revision: 10004
Log:
Fix bug #49525 - Search for unreads should require login
Authorised by: AcydBurn
Modified:
branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html
branches/phpBB-3_0_0/phpBB/language/en/search.php
branches/phpBB-3_0_0/phpBB/search.php
Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html
==============================================================================
*** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original)
--- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Mon Aug 17 14:25:04 2009
***************
*** 223,228 ****
--- 223,229 ----
<li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
<li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
<li>[Change] Unapproved topics can no longer be replied to (Bug #44005)</li>
+ <li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
<li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
<li>[Feature] Backported 3.2 captcha plugins.
Modified: branches/phpBB-3_0_0/phpBB/language/en/search.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/language/en/search.php (original)
--- branches/phpBB-3_0_0/phpBB/language/en/search.php Mon Aug 17 14:25:04 2009
***************
*** 53,58 ****
--- 53,59 ----
'JUMP_TO_POST' => 'Jump to post',
'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
+ 'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.',
'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
Modified: branches/phpBB-3_0_0/phpBB/search.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/search.php (original)
--- branches/phpBB-3_0_0/phpBB/search.php Mon Aug 17 14:25:04 2009
***************
*** 95,100 ****
--- 95,107 ----
}
}
+ // 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'])
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
+ }
+
// If we are looking for authors get their ids
$author_id_ary = array();
$sql_author_match = '';
|