aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index f3198bc1e5..cd4c901b58 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -63,10 +63,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($request->is_ajax())
{
- // Tell the ajax script what language vars need to be replaced
+ // Tell the ajax script what language vars and URL need to be replaced
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
- 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS']
+ 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
$json_response = new phpbb_json_response();
$json_response->send($data);
@@ -326,10 +329,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($request->is_ajax())
{
- // Tell the ajax script what language vars need to be replaced
+ // Tell the ajax script what language vars and URL need to be replaced
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
- 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS']
+ 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
$json_response = new phpbb_json_response();
$json_response->send($data);