mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-04 22:58:10 +02:00
Fix bug #51585 - Search loginbox or auth message differs
Authorised by: ToonArmy git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10426 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6924580e7d
commit
cb389894e9
@ -147,6 +147,7 @@
|
||||
<li>[Change] It is no longer possible to persist a solution for the login CAPTCHA.</li>
|
||||
<li>[Change] SQLite is no longer autoloaded by the installer. (Bug #56105)</li>
|
||||
<li>[Change] Friends and foes will not show up as private message rule options if their respective UCP modules are disabled. (Bug #51155)</li>
|
||||
<li>[Change] Offer for guests to log in for egosearch and unreadposts search before the search permissions check. (Bug #51585)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v305"></a><h3>1.ii. Changes since 3.0.5</h3>
|
||||
|
@ -47,6 +47,26 @@ $sort_dir = request_var('sd', 'd');
|
||||
$return_chars = request_var('ch', ($topic_id) ? -1 : 300);
|
||||
$search_forum = request_var('fid', array(0));
|
||||
|
||||
// We put login boxes for the case if search_id is egosearch or unreadposts
|
||||
// because a guest should be able to log in even if guests search is not permitted
|
||||
|
||||
// Egosearch is an author search
|
||||
if ($search_id == 'egosearch')
|
||||
{
|
||||
$author_id = $user->data['user_id'];
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_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'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
|
||||
}
|
||||
|
||||
// Is user able to search? Has search been disabled?
|
||||
if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])
|
||||
{
|
||||
@ -84,24 +104,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
// clear arrays
|
||||
$id_ary = array();
|
||||
|
||||
// egosearch is an author search
|
||||
if ($search_id == 'egosearch')
|
||||
{
|
||||
$author_id = $user->data['user_id'];
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_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'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
|
||||
}
|
||||
|
||||
// If we are looking for authors get their ids
|
||||
$author_id_ary = array();
|
||||
$sql_author_match = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user