1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

Merge branch 'ticket/bantu/9613' into develop-olympus

* ticket/bantu/9613:
  [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.
This commit is contained in:
Igor Wiedler
2010-09-16 22:34:48 +02:00
9 changed files with 22 additions and 5 deletions

View File

@@ -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?