mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
remove global and change $user-> to phpbb::$user->
git-svn-id: file:///svn/phpbb/trunk@9334 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -18,15 +18,15 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('mcp');
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$user->setup('mcp');
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$post_id = request_var('p', 0);
|
||||
$reason_id = request_var('reason_id', 0);
|
||||
$report_text = utf8_normalize_nfc(request_var('report_text', '', true));
|
||||
$user_notify = ($user->data['is_registered']) ? request_var('notify', 0) : false;
|
||||
$user_notify = (phpbb::$user->is_registered) ? request_var('notify', 0) : false;
|
||||
|
||||
$submit = phpbb_request::is_set_post('submit');
|
||||
|
||||
@@ -50,7 +50,7 @@ $sql = 'SELECT t.*, p.*
|
||||
AND p.topic_id = t.topic_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$report_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
|
||||
if (!$report_data)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ $sql = 'SELECT *
|
||||
WHERE forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
|
||||
if (!$forum_data)
|
||||
{
|
||||
@@ -86,8 +86,8 @@ unset($acl_check_ary);
|
||||
|
||||
if ($report_data['post_reported'])
|
||||
{
|
||||
$message = $user->lang['ALREADY_REPORTED'];
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = phpbb::$user->lang['ALREADY_REPORTED'];
|
||||
$message .= '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ if ($submit && $reason_id)
|
||||
$sql_ary = array(
|
||||
'reason_id' => (int) $reason_id,
|
||||
'post_id' => $post_id,
|
||||
'user_id' => (int) $user->data['user_id'],
|
||||
'user_id' => (int) phpbb::$user->data['user_id'],
|
||||
'user_notify' => (int) $user_notify,
|
||||
'report_closed' => 0,
|
||||
'report_time' => (int) time(),
|
||||
@@ -139,7 +139,7 @@ if ($submit && $reason_id)
|
||||
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
$message = $user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = phpbb::$user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
@@ -151,13 +151,13 @@ $template->assign_vars(array(
|
||||
'S_REPORT_ACTION' => append_sid('report', 'f=' . $forum_id . '&p=' . $post_id),
|
||||
|
||||
'S_NOTIFY' => $user_notify,
|
||||
'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false)
|
||||
'S_CAN_NOTIFY' => (phpbb::$user->is_registered) ? true : false)
|
||||
);
|
||||
|
||||
generate_forum_nav($forum_data);
|
||||
|
||||
// Start output of page
|
||||
page_header($user->lang['REPORT_POST']);
|
||||
page_header(phpbb::$user->lang['REPORT_POST']);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'report_body.html')
|
||||
|
Reference in New Issue
Block a user