aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorHari Sankar R <hsr@theinglorio.us>2012-04-05 19:31:18 +0530
committerHari Sankar R <hsr@theinglorio.us>2012-04-05 19:31:18 +0530
commit018419b36cf4d81cf2fa3f82d85f9bc8580c9c19 (patch)
treedb73d96507a8639e8f815871354a78351d07b01e /phpBB/includes/ucp
parenta84b97f58e8177eb28ad41cfb261200d523c9ff5 (diff)
downloadforums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.gz
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.bz2
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.xz
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.zip
[ticket/10561] Moved and renamed the funtion validate_style().
Fixed minor changes as suggested by @bantu. PHPBB3-10561
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index e81bd1e1bb..5b915824d6 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -61,8 +61,14 @@ class ucp_prefs
if ($submit)
{
- $data['style'] = ($config['override_user_style']) ? $config['default_style'] :
- (phpbb_style_is_active($data['style']) ? $data['style'] : ((int) $user->data['user_style']));
+ if ($config['override_user_style'])
+ {
+ $data['style'] = $config['default_style'];
+ }
+ else if (!phpbb_validate_style($data['style']))
+ {
+ $data['style'] = (int) $user->data['user_style']);
+ }
$error = validate_data($data, array(
'dateformat' => array('string', false, 1, 30),