aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_ban.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-09-30 17:38:19 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-09-30 18:22:06 +0200
commit6f66423de960d98e8574d762f2fbda29b6778e30 (patch)
tree812f17e4b241e7b663130cbb7267a74e84ea22d0 /phpBB/includes/acp/acp_ban.php
parent7efc624b0a855a23c98f3c440d1a9c1f689402d1 (diff)
downloadforums-6f66423de960d98e8574d762f2fbda29b6778e30.tar
forums-6f66423de960d98e8574d762f2fbda29b6778e30.tar.gz
forums-6f66423de960d98e8574d762f2fbda29b6778e30.tar.bz2
forums-6f66423de960d98e8574d762f2fbda29b6778e30.tar.xz
forums-6f66423de960d98e8574d762f2fbda29b6778e30.zip
[ticket/13119] Remove unused globals and use the request class
PHPBB3-13119
Diffstat (limited to 'phpBB/includes/acp/acp_ban.php')
-rw-r--r--phpBB/includes/acp/acp_ban.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index 1510965ba3..b555f46a94 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -25,14 +25,13 @@ class acp_ban
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache, $phpbb_dispatcher;
- global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+ global $user, $template, $request, $phpbb_dispatcher;
+ global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- $bansubmit = (isset($_POST['bansubmit'])) ? true : false;
- $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
- $current_time = time();
+ $bansubmit = $request->is_set_post('bansubmit');
+ $unbansubmit = $request->is_set_post('unbansubmit');
$user->add_lang(array('acp/ban', 'acp/users'));
$this->tpl_name = 'acp_ban';
@@ -48,12 +47,12 @@ class acp_ban
if ($bansubmit)
{
// Grab the list of entries
- $ban = utf8_normalize_nfc(request_var('ban', '', true));
- $ban_length = request_var('banlength', 0);
- $ban_length_other = request_var('banlengthother', '');
- $ban_exclude = request_var('banexclude', 0);
- $ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
- $ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
+ $ban = $request->variable('ban', '', true);
+ $ban_length = $request->variable('banlength', 0);
+ $ban_length_other = $request->variable('banlengthother', '');
+ $ban_exclude = $request->variable('banexclude', 0);
+ $ban_reason = $request->variable('banreason', '', true);
+ $ban_give_reason = $request->variable('bangivereason', '', true);
if ($ban)
{
@@ -120,7 +119,7 @@ class acp_ban
}
else if ($unbansubmit)
{
- $ban = request_var('unban', array(''));
+ $ban = $request->variable('unban', array(''));
if ($ban)
{