//* DEBUG: */ print(__LINE__.'='.$mode.'/'.$what.'/'.getAction()."=<br />");
if (!isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
// sql_patches is missing so choose depending on mode
- if ($mode == 'admin') {
+ if (isWhatSet()) {
+ // Use setted what
+ $what = getWhat();
+ } elseif ($mode == 'admin') {
+ // Admin area
$what = 'overview';
} else {
+ // Everywhere else
$what = 'welcome';
}
} elseif ((empty($what)) && ($mode != 'admin')) {
// Free memory
SQL_FREERESULT($result);
- } elseif ((!isExtensionInstalled('sql_patches')) && ($mode != 'admin')) {
+ } elseif ((!isExtensionInstalled('sql_patches')) && (($mode != 'admin') && ($mode != 'unknown'))) {
// No sql_patches installed, but maybe we need to register an admin?
if (isAdminRegistered()) {
// Redirect to admin area