aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_styles.php
diff options
context:
space:
mode:
authorGabriel Vazquez <leviatan21@phpbb.com>2009-06-19 14:58:21 +0000
committerGabriel Vazquez <leviatan21@phpbb.com>2009-06-19 14:58:21 +0000
commit7cebffe72fcdbbbad70ccc926192d63a92e426ce (patch)
tree3bebf0dba539eb58ed105557e677ee48a5e05772 /phpBB/includes/acp/acp_styles.php
parent566bd3b791c0cd84940cd8d18cb92acff1b7fc0a (diff)
downloadforums-7cebffe72fcdbbbad70ccc926192d63a92e426ce.tar
forums-7cebffe72fcdbbbad70ccc926192d63a92e426ce.tar.gz
forums-7cebffe72fcdbbbad70ccc926192d63a92e426ce.tar.bz2
forums-7cebffe72fcdbbbad70ccc926192d63a92e426ce.tar.xz
forums-7cebffe72fcdbbbad70ccc926192d63a92e426ce.zip
Fixed bug #14304
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9629 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-rw-r--r--phpBB/includes/acp/acp_styles.php41
1 files changed, 27 insertions, 14 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 4c33aa1edb..16b1852cd6 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -210,23 +210,36 @@ parse_css_file = {PARSE_CSS_FILE}
trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $sql = 'UPDATE ' . STYLES_TABLE . '
- SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
- WHERE style_id = ' . $style_id;
- $db->sql_query($sql);
-
- // Set style to default for any member using deactivated style
- if ($action == 'deactivate')
+ if (($action == 'deactivate' && confirm_box(true)) || $action == 'activate')
{
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_style = ' . $config['default_style'] . "
- WHERE user_style = $style_id";
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
+ WHERE style_id = ' . $style_id;
$db->sql_query($sql);
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET forum_style = 0
- WHERE forum_style = ' . $style_id;
- $db->sql_query($sql);
+ // Set style to default for any member using deactivated style
+ if ($action == 'deactivate')
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . $config['default_style'] . "
+ WHERE user_style = $style_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_style = 0
+ WHERE forum_style = ' . $style_id;
+ $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;
}