forked from extern/egroupware
""
This commit is contained in:
parent
1113f2ec1c
commit
82e4a81bc8
@ -1818,10 +1818,13 @@ class etemplate extends boetemplate
|
||||
{
|
||||
if (strpos($on,'::') !== false) // avoid the expensive regular expresions, for performance reasons
|
||||
{
|
||||
if (preg_match("/egw::link\\('([^']+)','(.+?)'\\)/",$on,$matches)) // the ? alters the expression to shortest match
|
||||
{ // this way we can correctly parse ' in the 2. argument
|
||||
$url = $GLOBALS['egw']->link($matches[1],$matches[2]);
|
||||
$on = str_replace($matches[0],'\''.$url.'\'',$on);
|
||||
if (preg_match_all("/egw::link\\('([^']+)','(.+?)'\\)/",$on,$matches)) // the ? alters the expression to shortest match
|
||||
{
|
||||
foreach(array_keys($matches[1]) as $n) // this way we can correctly parse ' in the 2. argument
|
||||
{
|
||||
$url = $GLOBALS['egw']->link($matches[1][$n],$matches[2][$n]);
|
||||
$on = str_replace($matches[0][$n],'\''.$url.'\'',$on);
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match_all("/form::name\\('([^']+)'\\)/",$on,$matches)) {
|
||||
|
Loading…
Reference in New Issue
Block a user