Fix deprecated preg_replace with eval
This commit is contained in:
@@ -44,8 +44,13 @@ function PMA_lang($lang_key)
|
||||
$message = isset($GLOBALS["strConfig$lang_key"]) ? $GLOBALS["strConfig$lang_key"] : $lang_key;
|
||||
$message = str_replace($search, $replace, $message);
|
||||
// replace [a@"$1"]$2[/a] with <a href="$1">$2</a>
|
||||
$message = preg_replace('#\[a@("?)([^\]]+)\1\]([^\[]+)\[/a\]#e',
|
||||
"PMA_lang_link_replace('$2', '$3')", $message);
|
||||
$message = preg_replace_callback(
|
||||
'#\[a@("?)([^\]]+)\1\]([^\[]+)\[/a\]#',
|
||||
function ($matches) {
|
||||
return PMA_lang_link_replace($matches[2], $matches[3]);
|
||||
},
|
||||
$message
|
||||
);
|
||||
|
||||
if (func_num_args() == 1) {
|
||||
return $message;
|
||||
|
Reference in New Issue
Block a user