diff options
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index d13d4b444f..905eecee76 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -523,6 +523,19 @@ gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']); // Quick mod tools $allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false; +$s_quickmod_action = append_sid( + "{$phpbb_root_path}mcp.$phpEx", + array( + 'f' => $forum_id, + 't' => $topic_id, + 'start' => $start, + 'quickmod' => 1, + 'redirect' => urlencode(str_replace('&', '&', $viewtopic_url)), + ), + true, + $user->session_id +); + $quickmod_array = array( // 'key' => array('LANG_KEY', $userHasPermissions), @@ -546,7 +559,7 @@ foreach($quickmod_array as $option => $qm_ary) { if (!empty($qm_ary[1])) { - phpbb_add_quickmod_option($option, $qm_ary[0]); + phpbb_add_quickmod_option($s_quickmod_action, $option, $qm_ary[0]); } } @@ -631,7 +644,7 @@ $template->assign_vars(array( 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true, 'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start")), - 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . "&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id), + 'S_MOD_ACTION' => $s_quickmod_action, 'L_RETURN_TO_FORUM' => $user->lang('RETURN_TO', $topic_data['forum_name']), 'S_VIEWTOPIC' => true, @@ -1141,6 +1154,7 @@ while ($row = $db->sql_fetchrow($result)) 'username' => $row['username'], 'user_colour' => $row['user_colour'], + 'contact_user' => '', 'warnings' => 0, 'allow_pm' => 0, @@ -1198,6 +1212,7 @@ while ($row = $db->sql_fetchrow($result)) 'username' => $row['username'], 'user_colour' => $row['user_colour'], + 'contact_user' => $user->lang('CONTACT_USER', get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['username'])), 'online' => false, 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', @@ -1699,6 +1714,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'], 'POSTER_WARNINGS' => $auth->acl_get('m_warn') ? $user_cache[$poster_id]['warnings'] : '', 'POSTER_AGE' => $user_cache[$poster_id]['age'], + 'CONTACT_USER' => $user_cache[$poster_id]['contact_user'], 'POST_DATE' => $user->format_date($row['post_time'], false, ($view == 'print') ? true : false), 'POST_SUBJECT' => $row['post_subject'], @@ -1773,6 +1789,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var int current_row_number Number of the post on this page * @var int end Number of posts on this page * @var int total_posts Total posts count + * @var int poster_id Post author id * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster * @var array attachments List of attachments @@ -1782,12 +1799,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @since 3.1.0-a1 * @change 3.1.0-a3 Added vars start, current_row_number, end, attachments * @change 3.1.0-b3 Added topic_data array, total_posts + * @change 3.1.0-RC3 Added poster_id */ $vars = array( 'start', 'current_row_number', 'end', 'total_posts', + 'poster_id', 'row', 'cp_row', 'attachments', |