diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 09bd3e6cdb..f631b91e8d 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -174,8 +174,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list $template->assign_block_vars('jumpbox_forums', array( 'FORUM_ID' => ($select_all) ? 0 : -1, 'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'], - 'S_FORUM_COUNT' => $iteration) - ); + 'S_FORUM_COUNT' => $iteration, + 'LINK' => phpbb_append_url_param($action, 'f', $forum_id), + )); $iteration++; $display_jumpbox = true; @@ -188,8 +189,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list 'S_FORUM_COUNT' => $iteration, 'S_IS_CAT' => ($row['forum_type'] == FORUM_CAT) ? true : false, 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false, - 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false) - ); + 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false, + 'LINK' => phpbb_append_url_param($action, 'f', $row['forum_id']), + )); for ($i = 0; $i < $padding; $i++) { @@ -1452,16 +1454,18 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', /** * Add an option to the quick-mod tools. * + * @param string $url The recepting URL for the quickmod actions. * @param string $option The language key for the value of the option. * @param string $lang_string The language string to use. */ -function phpbb_add_quickmod_option($option, $lang_string) +function phpbb_add_quickmod_option($url, $option, $lang_string) { global $template, $user; $lang_string = $user->lang($lang_string); $template->assign_block_vars('quickmod', array( - 'VALUE' => $option, - 'TITLE' => $lang_string, + 'VALUE' => $option, + 'TITLE' => $lang_string, + 'LINK' => phpbb_append_url_param($url, 'action', $option), )); } diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index e9f8064b9e..70bc703582 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -356,37 +356,6 @@ $('.display_post').click(function(e) { $('#post_hidden' + post_id).hide(); }); - - -/** - * This AJAXifies the quick-mod tools. The reason it cannot be a standard - * callback / data attribute is that it requires filtering - some of the options - * can be ajaxified, while others cannot. - */ -phpbb.ajaxify({ - selector: '#quickmodform', - refresh: true, - filter: function (data) { - var action = $('#quick-mod-select').val(); - - if (action === 'make_normal') { - return $(this).find('select option[value="make_global"]').length > 0; - } else if (action === 'lock' || action === 'unlock') { - return true; - } - - if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') { - return true; - } - - return false; - } -}); - -$('#quick-mod-select').change(function () { - $('#quickmodform').submit(); -}); - $('#delete_permanent').click(function () { if ($(this).prop('checked')) { $('#delete_reason').hide(); diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html index 47d322407d..420fd62202 100644 --- a/phpBB/styles/prosilver/template/jumpbox.html +++ b/phpBB/styles/prosilver/template/jumpbox.html @@ -10,24 +10,23 @@ -
- -
- -
- - {HIDDEN_FIELDS_FOR_JUMPBOX} - - - -
- + + +

diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index a3fb8aa6da..7478ba4e28 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -242,6 +242,7 @@ +
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 481305e0d7..8d5e5f44bc 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -367,19 +367,21 @@ -
-
- - - - {S_FORM_TOKEN} -
-
+ +
+ + +
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index d87f7de2b0..c9f70c87e8 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,