Index: kernel/application.php =================================================================== --- kernel/application.php (revision 14949) +++ kernel/application.php (working copy) @@ -927,13 +927,13 @@ */ public function redirectToMaintenance() { - $maintenance_page = WRITEBALE_BASE . '/maintenance.html'; - // $query_string = $this->isAdmin ? '' : '?next_template=' . urlencode($_SERVER['REQUEST_URI']); // get next_template from query string if needed + $maintenance_page = WRITEBALE_BASE . '/maintenance.html'; + $query_string = ''; // $this->isAdmin ? '' : '?next_template=' . urlencode($_SERVER['REQUEST_URI']); - if ( file_exists(FULL_PATH . $maintenance_page) ) { - header('Location: ' . BASE_PATH . $maintenance_page); - exit; - } + if ( file_exists(FULL_PATH . $maintenance_page) ) { + header('Location: ' . BASE_PATH . $maintenance_page . $query_string); + exit; + } } /** @@ -956,8 +956,9 @@ $maintenance_template = $this->isAdmin ? 'login' : $this->ConfigValue('SoftMaintenanceTemplate'); if ( $this->GetVar('t') != $maintenance_template ) { + $redirect_params = Array (); - if (!$this->isAdmin) { + if ( !$this->isAdmin ) { $redirect_params['next_template'] = urlencode($_SERVER['REQUEST_URI']); }