Authorised by: AcydBurn 

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9629 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Gabriel Vazquez 2009-06-19 14:58:21 +00:00
parent 566bd3b791
commit 7cebffe72f
2 changed files with 28 additions and 14 deletions

View file

@ -131,6 +131,7 @@
<li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li> <li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
<li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li> <li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li> <li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
+ <li>[Feature] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
<li>[Feature] Backported 3.2 captcha plugins.</li> <li>[Feature] Backported 3.2 captcha plugins.</li>
<li>[Feature] Introduced new ACM plugins: <li>[Feature] Introduced new ACM plugins:
<ul> <ul>

View file

@ -210,6 +210,8 @@ parse_css_file = {PARSE_CSS_FILE}
trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
} }
if (($action == 'deactivate' && confirm_box(true)) || $action == 'activate')
{
$sql = 'UPDATE ' . STYLES_TABLE . ' $sql = 'UPDATE ' . STYLES_TABLE . '
SET style_active = ' . (($action == 'activate') ? 1 : 0) . ' SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
WHERE style_id = ' . $style_id; WHERE style_id = ' . $style_id;
@ -228,6 +230,17 @@ parse_css_file = {PARSE_CSS_FILE}
WHERE forum_style = ' . $style_id; WHERE forum_style = ' . $style_id;
$db->sql_query($sql); $db->sql_query($sql);
} }
}
elseif ( $action == 'deactivate' )
{
$s_hidden_fields = array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'style_id' => $style_id,
);
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
}
break; break;
} }