Skip to content

Commit

Permalink
Hide language select box if there are no locales installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Apr 20, 2012
1 parent d0f26dd commit 1b71d9d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions libraries/display_select_lang.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
?>

Expand Down
2 changes: 1 addition & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
echo ' <ul>';

// Displays language selection combo
if (empty($cfg['Lang'])) {
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
echo '<li id="li_select_lang">';
include_once 'libraries/display_select_lang.lib.php';
PMA_select_language();
Expand Down

0 comments on commit 1b71d9d

Please sign in to comment.