Merge remote-tracking branch 'origin/QA_4_7' into QA_4_7
This commit is contained in:
commit
4ac48de1c8
@ -60,6 +60,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #12960 Enclose exports in transaction by default
|
||||
- issue #12966 After adding a column ADD INDEX option won't be displayed when enabling AI
|
||||
- issue #12972 Better error message when Composer has not been run
|
||||
- issue #12988 Do not show language selector without choices
|
||||
|
||||
4.6.6 (2017-01-23)
|
||||
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'
|
||||
|
||||
@ -236,11 +236,12 @@ echo '<h2>' , __('Appearance settings') , '</h2>';
|
||||
echo ' <ul>';
|
||||
|
||||
// Displays language selection combo
|
||||
if (empty($cfg['Lang'])) {
|
||||
$language_manager = LanguageManager::getInstance();
|
||||
if (empty($cfg['Lang']) && $language_manager->hasChoice()) {
|
||||
echo '<li id="li_select_lang" class="no_bullets">';
|
||||
|
||||
echo PMA\libraries\Util::getImage('s_lang.png') , " "
|
||||
, LanguageManager::getInstance()->getSelectorDisplay();
|
||||
, $language_manager->getSelectorDisplay();
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
|
||||
@ -714,6 +714,16 @@ class LanguageManager
|
||||
return $this->_available_locales;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether there are some languages available
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasChoice()
|
||||
{
|
||||
return count($this->availableLanguages()) > 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns (cached) list of all available languages
|
||||
*
|
||||
|
||||
@ -220,7 +220,13 @@ class URL
|
||||
$params['collation_connection'] = $GLOBALS['collation_connection'];
|
||||
}
|
||||
|
||||
return $divider . http_build_query($params, null, $separator);
|
||||
$query = http_build_query($params, null, $separator);
|
||||
|
||||
if ($divider != '?' || strlen($query) > 0) {
|
||||
return $divider . $query;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -55,9 +55,11 @@ if (! isset($is_db) || ! $is_db) {
|
||||
$is_db = false;
|
||||
}
|
||||
// Not a valid db name -> back to the welcome page
|
||||
$uri = './index.php'
|
||||
. URL::getCommonRaw(array())
|
||||
. (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1';
|
||||
$params = array('reload' => '1');
|
||||
if (isset($message)) {
|
||||
$params['message'] = $message;
|
||||
}
|
||||
$uri = './index.php' . URL::getCommonRaw($params);
|
||||
if (strlen($db) === 0 || ! $is_db) {
|
||||
$response = Response::getInstance();
|
||||
if ($response->isAjax()) {
|
||||
|
||||
@ -153,13 +153,15 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
)->display();
|
||||
echo "</noscript>\n";
|
||||
|
||||
echo "<div class='hide js-show'>";
|
||||
// Displays the languages form
|
||||
if (empty($GLOBALS['cfg']['Lang'])) {
|
||||
$language_manager = LanguageManager::getInstance();
|
||||
if (empty($GLOBALS['cfg']['Lang']) && $language_manager->hasChoice()) {
|
||||
echo "<div class='hide js-show'>";
|
||||
// use fieldset, don't show doc link
|
||||
echo LanguageManager::getInstance()->getSelectorDisplay(true, false);
|
||||
echo $language_manager->getSelectorDisplay(true, false);
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>
|
||||
echo '
|
||||
<br />
|
||||
<!-- Login form -->
|
||||
<form method="post" action="index.php" name="login_form"' , $autocomplete ,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<?php if (count($available_languages) > 1) : ?>
|
||||
<form method="get" action="index.php" class="disableAjax">
|
||||
<?= PMA\libraries\URL::getHiddenInputs($_form_params) ?>
|
||||
|
||||
@ -31,6 +30,3 @@
|
||||
<?php endif; ?>
|
||||
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user