"using ungreeded search for egw::lang()"

This commit is contained in:
Ralf Becker 2008-03-03 05:47:12 +00:00
parent 4df4fd9f06
commit 233875a181

View File

@ -1855,8 +1855,8 @@ foreach($sess as $key => $val)
}
$on = str_replace($matches[0],$matches[1],$on);
}
if (preg_match('/egw::lang\(["\']{1}(.*)["\']{1}\)/',$on,$matches)) {
// 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);
}