From 98eeaacc3611f9e6714bab05c3517db78b815046 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 29 Jul 2014 13:21:16 +0200 Subject: [ticket/12895] Rename user style setting to resolve conflict with style param The style URL parameter, i.e. style=1, will conflict with the user's style setting due to it also being named style. This patch with solve this conflict. PHPBB3-12895 --- phpBB/includes/ucp/ucp_prefs.php | 12 ++++++------ phpBB/styles/prosilver/template/ucp_prefs_personal.html | 4 ++-- phpBB/styles/subsilver2/template/ucp_prefs_personal.html | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index df1e722fa4..a8c8920a7d 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -43,7 +43,7 @@ class ucp_prefs 'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']), 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), 'lang' => basename(request_var('lang', $user->data['user_lang'])), - 'style' => request_var('style', (int) $user->data['user_style']), + 'user_style' => request_var('user_style', (int) $user->data['user_style']), 'tz' => request_var('tz', $user->data['user_timezone']), 'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']), @@ -76,11 +76,11 @@ class ucp_prefs { if ($config['override_user_style']) { - $data['style'] = (int) $config['default_style']; + $data['user_style'] = (int) $config['default_style']; } - else if (!phpbb_style_is_active($data['style'])) + else if (!phpbb_style_is_active($data['user_style'])) { - $data['style'] = (int) $user->data['user_style']; + $data['user_style'] = (int) $user->data['user_style']; } $error = validate_data($data, array( @@ -107,7 +107,7 @@ class ucp_prefs 'user_dateformat' => $data['dateformat'], 'user_lang' => $data['lang'], 'user_timezone' => $data['tz'], - 'user_style' => $data['style'], + 'user_style' => $data['user_style'], ); /** @@ -207,7 +207,7 @@ class ucp_prefs 'S_MORE_STYLES' => $s_more_styles, 'S_LANG_OPTIONS' => language_select($data['lang']), - 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']), + 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style']), 'S_TZ_OPTIONS' => $timezone_selects['tz_select'], 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'], 'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false, diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index d07aab1a89..c8b028f83a 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -58,8 +58,8 @@
-
-
+
+
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index 93fcfac5b1..1c76e3226d 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -49,7 +49,7 @@ {L_BOARD_STYLE}{L_COLON} - + -- cgit v1.2.1