aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-05-18 21:03:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-05-18 21:03:56 +0000
commit3c02d5f2df00cecd6a0bc4a945ee3355bd423a81 (patch)
tree0c2d02685fee117d7643e13e0aa4f9da1956000d /phpBB/includes/mcp
parent7e25c8d9cc255fbe460c2a970ad7da241c0880bb (diff)
downloadforums-3c02d5f2df00cecd6a0bc4a945ee3355bd423a81.tar
forums-3c02d5f2df00cecd6a0bc4a945ee3355bd423a81.tar.gz
forums-3c02d5f2df00cecd6a0bc4a945ee3355bd423a81.tar.bz2
forums-3c02d5f2df00cecd6a0bc4a945ee3355bd423a81.tar.xz
forums-3c02d5f2df00cecd6a0bc4a945ee3355bd423a81.zip
- fixing a few tiny bugs
- added new function to (re)apply sids where needed (login and mcp quickmod) - #1829 git-svn-id: file:///svn/phpbb/trunk@5931 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r--phpBB/includes/mcp/mcp_main.php48
-rw-r--r--phpBB/includes/mcp/mcp_queue.php16
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php8
-rw-r--r--phpBB/includes/mcp/mcp_topic.php16
4 files changed, 22 insertions, 66 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 5b7433a6a3..dc4df52f50 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -243,12 +243,8 @@ function lock_unlock($action, $ids)
confirm_box(false, strtoupper($action) . '_' . $l_prefix . ((sizeof($ids) == 1) ? '' : 'S'), $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -352,12 +348,8 @@ function change_topic_type($action, $topic_ids)
confirm_box(false, $l_new_type, $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -501,12 +493,8 @@ function mcp_move_topic($topic_ids)
confirm_box(false, 'MOVE_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -567,12 +555,8 @@ 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$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -690,12 +674,8 @@ function mcp_delete_post($post_ids)
confirm_box(false, (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS', $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -936,12 +916,8 @@ function mcp_fork_topic($topic_ids)
confirm_box(false, 'FORK_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 948d345ea5..8c0dc9cd6d 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -510,12 +510,8 @@ function approve_post($post_id_list, $mode)
confirm_box(false, 'APPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -714,12 +710,8 @@ function disapprove_post($post_id_list, $mode)
confirm_box(false, 'DISAPPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 0f97dd7e27..e71e7507bb 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -482,12 +482,8 @@ function close_report($post_id_list, $mode, $action)
confirm_box(false, $user->lang[strtoupper($action) . '_REPORT' . ((sizeof($post_id_list) == 1) ? '' : 'S') . '_CONFIRM'], $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index b6a9bebd83..b8fbfd3bae 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -380,12 +380,8 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{
@@ -476,12 +472,8 @@ function merge_posts($topic_id, $to_topic_id)
confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
}
- $redirect = request_var('redirect', "index.$phpEx$SID");
-
- if (strpos($redirect, '?') === false)
- {
- $redirect = substr_replace($redirect, ".$phpEx$SID&", strpos($redirect, '&'), 1);
- }
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
if (!$success_msg)
{