bug 2516: compiled_template_cache_language option does not work properly (again)

git-svn-id: http://piwigo.org/svn/trunk@12656 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2011-11-22 21:18:15 +00:00
parent 85a60f15e5
commit 45dcf686ee
+2 -2
View File
@@ -769,10 +769,10 @@ var s,after = document.getElementsByTagName(\'script\')[document.getElementsByTa
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? $lang[$m[1]] : $m[0];'), $source);
$regex = "~$ldq *\'([^'$]+)\'\|@translate\|~";
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : \'$m[0]\';'), $source);
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : $m[0];'), $source);
$regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~";
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : \'$m[0]\';'), $source);
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : $m[0];'), $source);
return $source;
}