aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/report.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-06-06 20:53:46 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-06-06 20:53:46 +0000
commitdd9ad539fdab80badedf801a816b8a0beafbbf5c (patch)
treedb8ae8a184b060d5576604cc0dfa723773daedb8 /phpBB/report.php
parent2c8afb820e3842bed2ab6cec4053e71b5c566985 (diff)
downloadforums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar
forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.gz
forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.bz2
forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.xz
forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.zip
ok, this one is rather large... the most important change:
re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different apart from this, code cleanage, bug fixing, etc. git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/report.php')
-rw-r--r--phpBB/report.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/report.php b/phpBB/report.php
index 29998c2a97..37efec3208 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -14,8 +14,8 @@
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.'.$phpEx);
-include($phpbb_root_path . 'includes/functions_display.'.$phpEx);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
@@ -26,13 +26,14 @@ $post_id = request_var('p', 0);
$reason_id = request_var('reason_id', 0);
$report_text = request_var('report_text', '', true);
$user_notify = (isset($_POST['notify']) && $user->data['is_registered']) ? true : false;
+$submit = (isset($_POST['submit'])) ? true : false;
if (!$post_id)
{
trigger_error('INVALID_MODE');
}
-$redirect_url = "viewtopic.$phpEx$SID&p=$post_id#p$post_id";
+$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$post_id") . "#p$post_id";
// Has the report been cancelled?
if (isset($_POST['cancel']))
@@ -73,12 +74,12 @@ unset($acl_check_ary);
if ($report_data['post_reported'])
{
$message = $user->lang['ALREADY_REPORTED'];
- $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $phpbb_root_path . $redirect_url . '">', '</a>');
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
trigger_error($message);
}
// Submit report?
-if (isset($_POST['submit']) && $reason_id)
+if ($submit && $reason_id)
{
$sql = 'SELECT *
FROM ' . REASONS_TABLE . "
@@ -124,7 +125,7 @@ if (isset($_POST['submit']) && $reason_id)
meta_refresh(3, $redirect_url);
- $message = $user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $phpbb_root_path . $redirect_url . '">', '</a>');
+ $message = $user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
trigger_error($message);
}
@@ -133,7 +134,7 @@ display_reasons($reason_id);
$template->assign_vars(array(
'REPORT_TEXT' => $report_text,
- 'S_REPORT_ACTION' => "{$phpbb_root_path}report.$phpEx$SID&amp;p=$post_id",
+ 'S_REPORT_ACTION' => append_sid("{$phpbb_root_path}report.$phpEx", 'p=' . $post_id),
'S_NOTIFY' => $user_notify,
'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false)