Line 39 | Line 39 |
---|
$this->tpl_name = 'acp_ranks'; $this->page_title = 'ACP_MANAGE_RANKS';
|
$this->tpl_name = 'acp_ranks'; $this->page_title = 'ACP_MANAGE_RANKS';
|
$form_name = 'acp_prune';
| $form_name = 'acp_ranks';
|
add_form_key($form_name);
switch ($action)
| add_form_key($form_name);
switch ($action)
|
Line 52 | Line 52 |
---|
} $rank_title = utf8_normalize_nfc(request_var('title', '', true)); $special_rank = request_var('special_rank', 0);
|
} $rank_title = utf8_normalize_nfc(request_var('title', '', true)); $special_rank = request_var('special_rank', 0);
|
$min_posts = ($special_rank) ? 0 : request_var('min_posts', 0);
| $min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0));
|
$rank_image = request_var('rank_image', '');
// The rank image has to be a jpg, gif or png
| $rank_image = request_var('rank_image', '');
// The rank image has to be a jpg, gif or png
|
Line 168 | Line 168 |
---|
{ $img = $path . $img;
|
{ $img = $path . $img;
|
if (!in_array($img, $existing_imgs) || $action == 'edit') {
| |
if ($ranks && $img == $ranks['rank_image']) { $selected = ' selected="selected"';
| if ($ranks && $img == $ranks['rank_image']) { $selected = ' selected="selected"';
|
Line 185 | Line 183 |
---|
continue; }
|
continue; }
|
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>'; }
| $filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . ((in_array($img, $existing_imgs)) ? ' ' . $user->lang['RANK_IMAGE_IN_USE'] : '') . '</option>';
|
} }
| } }
|
Line 202 | Line 199 |
---|
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '', 'S_FILENAME_LIST' => $filename_list, 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '', 'S_FILENAME_LIST' => $filename_list, 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false,
| 'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
|
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0) );
| 'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0) );
|