[*] Installer : replaced radio buttons by a select for the installer language list (too many languages)

This commit is contained in:
Damien Metzger
2013-10-08 17:06:02 +02:00
parent 0db2372724
commit 180a778e51
4 changed files with 18 additions and 17 deletions
+10 -1
View File
@@ -65,6 +65,7 @@ class InstallLanguages
foreach (scandir(_PS_INSTALL_LANGS_PATH_) as $lang)
if ($lang[0] != '.' && is_dir(_PS_INSTALL_LANGS_PATH_.$lang) && $lang != self::DEFAULT_ISO && file_exists(_PS_INSTALL_LANGS_PATH_.$lang.'/install.php'))
$this->languages[$lang] = new InstallLanguage($lang);
uasort($this->languages, 'ps_usort_languages');
}
/**
@@ -76,7 +77,6 @@ class InstallLanguages
{
if (!in_array($iso, $this->getIsoList()))
throw new PrestashopInstallerException('Language '.$iso.' not found');
$this->language = $iso;
}
@@ -202,3 +202,12 @@ class InstallLanguages
return false;
}
}
function ps_usort_languages($a, $b)
{
$aname = $a->getMetaInformation('name');
$bname = $b->getMetaInformation('name');
if ($aname == $bname)
return 0;
return ($aname < $bname) ? -1 : 1;
}