Feature #20777 » bugreport_11571.diff
MODclass.tslib_pibase.php 2009-07-23 09:36:03.000000000 +0200 | ||
---|---|---|
while(list($k,$lA)=each($this->conf['_LOCAL_LANG.'])) {
|
||
if (is_array($lA)) {
|
||
$k = substr($k,0,-1);
|
||
|
||
// support for _LOCAL_LANG Keys like listView.more
|
||
if (is_array($lA)) {
|
||
$lA = $this->pi_getFlatArray($lA);
|
||
}
|
||
|
||
foreach($lA as $llK => $llV) {
|
||
if (!is_array($llV)) {
|
||
$this->LOCAL_LANG[$k][$llK] = $llV;
|
||
... | ... | |
if (is_array($parseFunc)) $str = $this->cObj->parseFunc($str, $parseFunc);
|
||
return $str;
|
||
}
|
||
|
||
/**
|
||
* pi_getFlatArray()
|
||
*
|
||
* - returns a flattened array
|
||
*
|
||
* @param array recursive array
|
||
* @return array flat array
|
||
*/
|
||
function pi_getFlatArray($array){
|
||
do {
|
||
$subArraysFound = false;
|
||
|
||
foreach($array as $key => $value){
|
||
if(is_array($value)){
|
||
foreach($value as $subkey => $subvalue){
|
||
if(is_array($subvalue)){
|
||
$subArraysFound = true;
|
||
}
|
||
$array[$key.$subkey] = $subvalue;
|
||
}
|
||
unset($array[$key]);
|
||
}
|
||
}
|
||
|
||
} while($subArraysFound);
|
||
|
||
return $array;
|
||
}
|
||