mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
handling parameter-replacements in translation class
This commit is contained in:
parent
b1d33d5277
commit
1a3a131b0d
@ -187,10 +187,11 @@ class translation
|
|||||||
{
|
{
|
||||||
if (count($vars) > 1)
|
if (count($vars) > 1)
|
||||||
{
|
{
|
||||||
static $placeholders = array('%2','%1','|%2|','%3','%4','%5','%6','%7','%8','%9','%10');
|
static $placeholders = array('%3','%2','%1','|%2|','|%3|','%4','%5','%6','%7','%8','%9','%10');
|
||||||
// to cope with $vars[0] containing '%2' (eg. an urlencoded path like a referer),
|
// to cope with $vars[0] containing '%2' (eg. an urlencoded path like a referer),
|
||||||
// we first replace '%2' in $ret with '|%2|' and then use that as 2. placeholder
|
// we first replace '%2' in $ret with '|%2|' and then use that as 2. placeholder
|
||||||
array_unshift($vars,'|%2|'); // push '|%2|' as first replacement on $vars
|
// we do that for %3 as well, ...
|
||||||
|
array_unshift($vars,array('|%3|','|%2|')); // push '|%2|' (and such) as first replacement on $vars
|
||||||
$ret = str_replace($placeholders,$vars,$ret);
|
$ret = str_replace($placeholders,$vars,$ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user