mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Make etemplate able to handle multiple calls to egw::lang() in the same line
This commit is contained in:
parent
52a96767cf
commit
c8f411bd4c
@ -1875,9 +1875,11 @@ class etemplate extends boetemplate
|
|||||||
$on = str_replace($matches[0],$matches[1],$on);
|
$on = str_replace($matches[0],$matches[1],$on);
|
||||||
}
|
}
|
||||||
// we need to search ungready (shortest possible match), to avoid catching to much
|
// we need to search ungready (shortest possible match), to avoid catching to much
|
||||||
if (preg_match('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) {
|
if (preg_match_all('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) {
|
||||||
$str = lang($matches[1]);
|
foreach($matches[1] as $n => $string) {
|
||||||
$on = str_replace($matches[0],'\''.addslashes($str).'\'',$on);
|
$str = lang($string);
|
||||||
|
$on = str_replace($matches[0][$n],'\''.addslashes($str).'\'',$on);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// inserts the styles of a named template
|
// inserts the styles of a named template
|
||||||
|
Loading…
Reference in New Issue
Block a user