Commit 81402705 authored by JosephK's avatar JosephK
Browse files

Bug translate

parent ba7e23aa
......@@ -17,7 +17,9 @@ function hook_recovery_render_tools($data)
{
$html = file_get_contents(PluginManager::$PLUGINS_PATH .'/recovery/tools.html');
function translate($matches) { return t($matches[1]); }
if(!function_exists(translate)) {
function translate($matches) { return t($matches[1]); }
}
$html = preg_replace_callback('/\{\'(.+)\'\|t\}/i', translate, $html );
if (isset ($GLOBALS['config']['email'])) {
......
......@@ -10,7 +10,9 @@ function tags_advanced_config($taData)
$html = file_get_contents(PluginManager::$PLUGINS_PATH .'/tags_advanced/tools.html');
$html = str_replace('{$token}', getToken() , $html);
function translate($matches) { return t($matches[1]); }
if(!function_exists(translate)) {
function translate($matches) { return t($matches[1]); }
}
$html = preg_replace_callback('/\{\'(.+)\'\|t\}/i', translate, $html );
if(!isset($taData) || empty($taData)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment