mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-30 03:30:17 +02:00
[ticket/10954] Mark topics read without popup
Also added missing handling of locked forums. PHPBB3-10954
This commit is contained in:
@@ -181,7 +181,20 @@ if ($mark_read == 'topics')
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Tell the ajax script what language vars need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
}
|
||||
|
||||
// Is a forum specific topic count required?
|
||||
|
Reference in New Issue
Block a user