aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_prefs.php
diff options
context:
space:
mode:
authorSenky <jakubsenko@gmail.com>2012-05-16 23:02:20 +0200
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-05 12:07:37 -0500
commitaf064cdaad357f705fc7c80f4d018d57cffa8d33 (patch)
tree2d774aae21643dcabc06b0880d26c1aba2c64925 /phpBB/includes/ucp/ucp_prefs.php
parent819206a336f812cb1de3d0a5febd073f00c141ec (diff)
downloadforums-af064cdaad357f705fc7c80f4d018d57cffa8d33.tar
forums-af064cdaad357f705fc7c80f4d018d57cffa8d33.tar.gz
forums-af064cdaad357f705fc7c80f4d018d57cffa8d33.tar.bz2
forums-af064cdaad357f705fc7c80f4d018d57cffa8d33.tar.xz
forums-af064cdaad357f705fc7c80f4d018d57cffa8d33.zip
[ticket/10841] Modifying style and language selectors in UCP
Commit also deletes all unnecessary blank spaces at the end of the lines in both ucp_prefs_personal.html PHPBB3-10841
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 17d7d23f02..19e1b45787 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -134,6 +134,33 @@ class ucp_prefs
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+ // check for count of installed languages
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+ if( $db->sql_affectedrows() > 1 )
+ {
+ $s_more_languages = true;
+ }
+ else
+ {
+ $s_more_languages = false;
+ }
+
+ // check for count of installed and active styles
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_active = 1';
+ $result = $db->sql_query($sql);
+ if( $db->sql_affectedrows() > 1 )
+ {
+ $s_more_styles = true;
+ }
+ else
+ {
+ $s_more_styles = false;
+ }
+
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
@@ -155,6 +182,9 @@ class ucp_prefs
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
+ 'S_MORE_LANGUAGES' => $s_more_languages,
+ '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_TZ_OPTIONS' => tz_select($data['tz'], true),