Use the fallback in PMA_toggleButton(), if the theme is missing the graphics for it

This commit is contained in:
Rouslan Placella 2011-09-23 19:15:17 +01:00
parent a827abba17
commit 3cbc022058

View File

@ -2637,7 +2637,7 @@ function PMA_toggleButton($action, $select_name, $options, $callback)
}
// Generate output
$retval = "<!-- TOGGLE START -->\n";
if ($GLOBALS['cfg']['AjaxEnable']) {
if ($GLOBALS['cfg']['AjaxEnable'] && is_readable($_SESSION['PMA_Theme']->getImgPath() . 'toggle-ltr.png')) {
$retval .= "<noscript>\n";
}
$retval .= "<div class='wrapper'>\n";
@ -2653,7 +2653,7 @@ function PMA_toggleButton($action, $select_name, $options, $callback)
$retval .= " <input type='submit' value='" . __('Change') . "'/>\n";
$retval .= " </form>\n";
$retval .= "</div>\n";
if ($GLOBALS['cfg']['AjaxEnable']) {
if ($GLOBALS['cfg']['AjaxEnable'] && is_readable($_SESSION['PMA_Theme']->getImgPath() . 'toggle-ltr.png')) {
$retval .= "</noscript>\n";
$retval .= "<div class='wrapper toggleAjax hide'>\n";
$retval .= " <div class='toggleButton'>\n";