aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_ranks.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_ranks.php')
-rw-r--r--phpBB/includes/acp/acp_ranks.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index 5885de57ec..4d2b64d74c 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -25,16 +25,16 @@ class acp_ranks
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $db, $user, $template, $cache, $request, $phpbb_dispatcher;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpbb_log;
$user->add_lang('acp/posting');
// Set up general vars
- $action = request_var('action', '');
+ $action = $request->variable('action', '');
$action = (isset($_POST['add'])) ? 'add' : $action;
$action = (isset($_POST['save'])) ? 'save' : $action;
- $rank_id = request_var('id', 0);
+ $rank_id = $request->variable('id', 0);
$this->tpl_name = 'acp_ranks';
$this->page_title = 'ACP_MANAGE_RANKS';
@@ -50,10 +50,10 @@ class acp_ranks
{
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
- $rank_title = utf8_normalize_nfc(request_var('title', '', true));
- $special_rank = request_var('special_rank', 0);
- $min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0));
- $rank_image = request_var('rank_image', '');
+ $rank_title = $request->variable('title', '', true);
+ $special_rank = $request->variable('special_rank', 0);
+ $min_posts = ($special_rank) ? 0 : max(0, $request->variable('min_posts', 0));
+ $rank_image = $request->variable('rank_image', '');
// The rank image has to be a jpg, gif or png
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
@@ -89,14 +89,14 @@ class acp_ranks
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
$message = $user->lang['RANK_UPDATED'];
- add_log('admin', 'LOG_RANK_UPDATED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_UPDATED', false, array($rank_title));
}
else
{
$sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$message = $user->lang['RANK_ADDED'];
- add_log('admin', 'LOG_RANK_ADDED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_ADDED', false, array($rank_title));
}
$db->sql_query($sql);
@@ -133,7 +133,7 @@ class acp_ranks
$cache->destroy('_ranks');
- add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_REMOVED', false, array($rank_title));
if ($request->is_ajax())
{
@@ -162,7 +162,7 @@ class acp_ranks
case 'edit':
case 'add':
- $data = $ranks = $existing_imgs = array();
+ $ranks = $existing_imgs = array();
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '