mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 00:54:49 +02:00
AdminUI: Fixes saving of checkbox values when values are empty. Language-class: additional option added to installed() for en=>English array format.
This commit is contained in:
@@ -392,6 +392,7 @@ class language{
|
||||
* @param str $type - English or Native.
|
||||
* @example type = english: array(0=>'English', 1=>'French' ...)
|
||||
* @example type = native: array('English'=>'English', 'French'=>'Francais'...)
|
||||
* @example type = abbr: array('en'=>'English, 'fr'=>'French' ... )
|
||||
* @return array
|
||||
*/
|
||||
function installed($type='english')
|
||||
@@ -415,20 +416,39 @@ class language{
|
||||
$this->lanlist = array_intersect($lanlist,$this->list);
|
||||
}
|
||||
|
||||
if($type == 'native')
|
||||
switch($type)
|
||||
{
|
||||
$natList = array();
|
||||
foreach($this->lanlist as $lang)
|
||||
{
|
||||
$natList[$lang] = $this->toNative($lang);
|
||||
}
|
||||
case "native":
|
||||
$natList = array();
|
||||
foreach($this->lanlist as $lang)
|
||||
{
|
||||
$natList[$lang] = $this->toNative($lang);
|
||||
}
|
||||
|
||||
natsort($natList);
|
||||
natsort($natList);
|
||||
|
||||
return $natList;
|
||||
return $natList;
|
||||
break;
|
||||
|
||||
case "abbr":
|
||||
$natList = array();
|
||||
foreach($this->lanlist as $lang)
|
||||
{
|
||||
$iso = $this->convert($lang);
|
||||
$natList[$iso] = $lang;
|
||||
}
|
||||
|
||||
natsort($natList);
|
||||
|
||||
return $natList;
|
||||
break;
|
||||
|
||||
case "english":
|
||||
default:
|
||||
return $this->lanlist;
|
||||
}
|
||||
|
||||
return $this->lanlist;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user