Support for localised texts in defaults.
This commit is contained in:
@@ -13,6 +13,7 @@ $Source$
|
|||||||
- Add support for groupping options.
|
- Add support for groupping options.
|
||||||
- Support for forcing one of two bool/bgroups.
|
- Support for forcing one of two bool/bgroups.
|
||||||
- Add documentation.
|
- Add documentation.
|
||||||
|
- Support for localised texts in defaults.
|
||||||
* css/phpmyadmin.css.php, themes/darkblue_orange/css/theme_right.css.php,
|
* css/phpmyadmin.css.php, themes/darkblue_orange/css/theme_right.css.php,
|
||||||
themes/original/css/theme_right.css.php: New style for non table forms
|
themes/original/css/theme_right.css.php: New style for non table forms
|
||||||
used in plugins.
|
used in plugins.
|
||||||
|
@@ -91,7 +91,19 @@ function PMA_pluginGetDefault($section, $opt)
|
|||||||
if (isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) {
|
if (isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) {
|
||||||
return htmlspecialchars($_REQUEST[$opt]);
|
return htmlspecialchars($_REQUEST[$opt]);
|
||||||
} elseif (isset($GLOBALS['cfg'][$section][$opt])) {
|
} elseif (isset($GLOBALS['cfg'][$section][$opt])) {
|
||||||
return htmlspecialchars($GLOBALS['cfg'][$section][$opt]);
|
$matches = array();
|
||||||
|
/* Possibly replace localised texts */
|
||||||
|
if (preg_match_all('/(str[A-Z][A-Za-z0-9]*)/', $GLOBALS['cfg'][$section][$opt], $matches)) {
|
||||||
|
$val = $GLOBALS['cfg'][$section][$opt];
|
||||||
|
foreach($matches[0] as $match) {
|
||||||
|
if (isset($GLOBALS[$match])) {
|
||||||
|
$val = str_replace($match, $GLOBALS[$match], $val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return htmlspecialchars($val);
|
||||||
|
} else {
|
||||||
|
return htmlspecialchars($GLOBALS['cfg'][$section][$opt]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user