diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 952b986d9f..674f8b1ff4 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -254,10 +254,26 @@
-
+
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index b8387482bf..f9526b9b28 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -347,7 +347,29 @@
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 7cb6df3660..450ebfeda8 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -517,20 +517,6 @@ 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;
-$topic_mod = '';
-$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '' : '') : '';
-$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '' : '';
-$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '' : '';
-
// If we've got a hightlight set pass it on to pagination.
$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
@@ -617,7 +603,19 @@ $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_TOPIC_MOD' => ($topic_mod != '') ? '' : '',
+ 'S_TOPIC_MOD_LOCK' => ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? 'lock' : 'unlock') : '',
+ 'S_TOPIC_MOD_DELETE' => ($auth->acl_get('m_delete', $forum_id)) ? true : false,
+ 'S_TOPIC_MOD_MOVE' => ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? true : false,
+ 'S_TOPIC_MOD_SPLIT' => ($auth->acl_get('m_split', $forum_id)) ? true : false,
+ 'S_TOPIC_MOD_MERGE' => ($auth->acl_get('m_merge', $forum_id)) ? true : false,
+ 'S_TOPIC_MOD_MERGE_TOPIC' => ($auth->acl_get('m_merge', $forum_id)) ? true : false,
+ 'S_TOPIC_MOD_FORK' => ($auth->acl_get('m_move', $forum_id)) ? true : false,
+ 'S_TOPIC_MOD_MAKE_NORMAL' => ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? true : false,
+ 'S_TOPIC_MOD_MAKE_STICKY' => ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? true : false,
+ 'S_TOPIC_MOD_MAKE_ANNOUNCE' => ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? true : false,
+ 'S_TOPIC_MOD_MAKE_GLOBAL' => ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? true : false,
+ 'S_TOPIC_MOD_TOPIC_LOGS' => ($auth->acl_get('m_', $forum_id)),
+
'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_VIEWTOPIC' => true,