identify active tab from PHP_SELF only if $GLOBALS['active_page'] is not set

This commit is contained in:
Sebastian Mendel
2007-09-28 07:27:54 +00:00
parent a375c17ea4
commit 35d2f6f984

View File

@@ -1536,11 +1536,12 @@ function PMA_getTab($tab)
if ($tab['text'] == $GLOBALS['strEmpty']
|| $tab['text'] == $GLOBALS['strDrop']) {
$tab['class'] = 'caution';
} elseif (!empty($tab['active'])
|| (isset($GLOBALS['active_page'])
&& $GLOBALS['active_page'] == $tab['link'])
|| (basename(PMA_getenv('PHP_SELF')) == $tab['link'] && empty($tab['warning'])))
{
} elseif (! empty($tab['active'])
|| PMA_isValid($GLOBALS['active_page'], 'identical', $tab['link'])) {
$tab['class'] = 'active';
} elseif (empty($GLOBALS['active_page'])
&& basename(PMA_getenv('PHP_SELF')) == $tab['link']
&& empty($tab['warning'])) {
$tab['class'] = 'active';
}
}