mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
Merge branch 'develop' of github.com:marc1706/phpbb3 into feature/avatars
This commit is contained in:
@@ -61,6 +61,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
{
|
||||
markread('all', false, false, request_var('mark_time', 0));
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// 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'],
|
||||
'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);
|
||||
}
|
||||
|
||||
trigger_error(
|
||||
$user->lang['FORUMS_MARKED'] . '<br /><br />' .
|
||||
sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>')
|
||||
@@ -313,6 +327,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// 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'],
|
||||
'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);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user