From 1b71d9d26a6efd52a0eb38585ea86cc9107f8d8d Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Fri, 20 Apr 2012 20:51:15 +0200 Subject: [PATCH 1/2] Hide language select box if there are no locales installed --- ChangeLog | 1 + libraries/display_select_lang.lib.php | 5 +++++ main.php | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e820486304..d92ec3d56c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,7 @@ phpMyAdmin - ChangeLog - bug #3468272 [import] Fixed import of ODS with more paragraphs in a cell - bug #3510196 [core] Improved redirecting with ForceSSL option + rfe #3518852 [edit] edit blob but not other binary, new option $cfg['ProtectBinary'] = 'noblob' ++ Hide language select box if there are no locales installed 3.5.1.0 (not yet released) - bug #3510784 [edit] Limit clause ignored when sort order is remembered diff --git a/libraries/display_select_lang.lib.php b/libraries/display_select_lang.lib.php index ea8fe5c69a..093f1aa6f9 100644 --- a/libraries/display_select_lang.lib.php +++ b/libraries/display_select_lang.lib.php @@ -30,6 +30,11 @@ function PMA_language_cmp(&$a, &$b) */ function PMA_select_language($use_fieldset = false, $show_doc = true) { + if (count($GLOBALS['available_languages']) == 1) { + // no use in switching languages, there is only one available + return; + } + global $cfg, $lang; ?> diff --git a/main.php b/main.php index 4baeda03a1..438dcf1d67 100644 --- a/main.php +++ b/main.php @@ -133,7 +133,7 @@ echo '

' . __('Appearance Settings') . '

'; echo '