From 6cfc56a6505b00cef6e2889b3672db108da04d35 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 27 Sep 2008 10:59:25 +0000 Subject: Better return links when deleting topics through the MCP. #34655 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8950 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/mcp/mcp_main.php | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'phpBB') diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 0cda530ec9..4e72e511bb 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -126,6 +126,7 @@
  • [Fix] Duplicate log messages for deleting a topic ('LOG_TOPIC_DELETED' has been deprecated in favour of 'LOG_DELETE_TOPIC').
  • [Fix] Use a distinct log message for shadow topic deletions to differentiate between normal topic deletions. (Bug #34635)
  • [Fix] Fix problems with styles using an underscore within the filename. (Bug #34315)
  • +
  • [Fix] Better return links when deleting topics through the MCP. (Bug #34655)
  • [Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.
  • [Change] Display warning in ACP if config.php file is left writable.
  • diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 7d871800f2..8fafb232cc 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -791,8 +791,17 @@ function mcp_delete_topic($topic_ids) confirm_box(false, (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS', $s_hidden_fields); } - $redirect = request_var('redirect', "index.$phpEx"); - $redirect = reapply_sid($redirect); + if (!isset($_REQUEST['quickmod'])) + { + $redirect = request_var('redirect', "index.$phpEx"); + $redirect = reapply_sid($redirect); + $redirect_message = 'PAGE'; + } + else + { + $redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); + $redirect_message = 'FORUM'; + } if (!$success_msg) { @@ -800,9 +809,8 @@ function mcp_delete_topic($topic_ids) } else { - $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); - meta_refresh(3, $redirect_url); - trigger_error($user->lang[$success_msg] . '

    ' . sprintf($user->lang['RETURN_FORUM'], '', '')); + meta_refresh(3, $redirect); + trigger_error($user->lang[$success_msg] . '

    ' . sprintf($user->lang['RETURN_' . $redirect_message], '', '')); } } -- cgit v1.2.1