mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
fixed replacement of multiple placeholders
This commit is contained in:
parent
a23919ea4b
commit
6c1f963aee
@ -191,7 +191,7 @@ class translation
|
||||
// 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 do that for %3 as well, ...
|
||||
array_unshift($vars,array('|%3|','|%2|')); // push '|%2|' (and such) as first replacement on $vars
|
||||
$vars = array_merge(array('|%3|','|%2|'),$vars); // push '|%2|' (and such) as first replacement on $vars
|
||||
$ret = str_replace($placeholders,$vars,$ret);
|
||||
}
|
||||
else
|
||||
@ -842,3 +842,8 @@ class translation
|
||||
return $this->db->select($this->lang_table,'message_id',$where,__LINE__,__FILE__)->fetchColumn();
|
||||
}
|
||||
}
|
||||
/*
|
||||
$msg = 'Bitte %1hier%2 clicken!';
|
||||
$replace = array('<a href="http://index.php?referer=%2Findex.php">','</a>');
|
||||
echo "<p>".htmlspecialchars(translation::translate($msg,$replace))."</p>\n";
|
||||
*/
|
Loading…
Reference in New Issue
Block a user