mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +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);
|
||||
}
|
||||
// we need to search ungready (shortest possible match), to avoid catching to much
|
||||
if (preg_match('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) {
|
||||
$str = lang($matches[1]);
|
||||
$on = str_replace($matches[0],'\''.addslashes($str).'\'',$on);
|
||||
if (preg_match_all('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) {
|
||||
foreach($matches[1] as $n => $string) {
|
||||
$str = lang($string);
|
||||
$on = str_replace($matches[0][$n],'\''.addslashes($str).'\'',$on);
|
||||
}
|
||||
}
|
||||
|
||||
// inserts the styles of a named template
|
||||
|
Loading…
Reference in New Issue
Block a user