diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2012-12-12 18:38:17 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2012-12-12 18:38:17 +0100 |
| commit | a57c81481d21433bdb185accfd7f2b82858ba461 (patch) | |
| tree | a8f7d7c62c057e3fa5813f6c6e8d9d04860601a3 /phpBB/viewforum.php | |
| parent | 7ce009f2e29045b2bd29dd670c900b79f7f3bd70 (diff) | |
| download | forums-a57c81481d21433bdb185accfd7f2b82858ba461.tar forums-a57c81481d21433bdb185accfd7f2b82858ba461.tar.gz forums-a57c81481d21433bdb185accfd7f2b82858ba461.tar.bz2 forums-a57c81481d21433bdb185accfd7f2b82858ba461.tar.xz forums-a57c81481d21433bdb185accfd7f2b82858ba461.zip | |
[ticket/10954] Mark topics read without popup
Also added missing handling of locked forums.
PHPBB3-10954
Diffstat (limited to 'phpBB/viewforum.php')
| -rw-r--r-- | phpBB/viewforum.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 83e5d4caa5..1b84c5f52f 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -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? |
