CVS update: /cowiki/htdocs/setup/
[email protected] 30 Apr 2005 00:20:27 -0000
| Newsgroups | gmane.comp.php.cowiki.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: dgorski Date: 2005/04/29 17:20:27 Modified: cowiki/htdocs/setup/installer.php Log: Check if we have a non-standard return target. E.g. if the installer has been called from the administration area. File Changes: Directory: /cowiki/htdocs/setup/ ================================ File [changed]: installer.php Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/setup/installer.php?r1=1.2&r2=1.3 Delta lines: +15 -11 --------------------- --- installer.php 29 Apr 2005 22:34:08 -0000 1.2 +++ installer.php 30 Apr 2005 00:20:25 -0000 1.3 @@ -2,7 +2,7 @@ /** * - * $Id: installer.php,v 1.2 2005/04/29 22:34:08 dgorski Exp $ + * $Id: installer.php,v 1.3 2005/04/30 00:20:25 dgorski Exp $ * * This file is part of coWiki. coWiki is free software under the terms of * the GNU General Public License (GPL). Read the LICENSE file. If you did @@ -17,7 +17,7 @@ * @author Daniel T. Gorski, <[email protected]> * @copyright (C) Daniel T. Gorski, {@link http://www.develnet.org} * @license http://www.gnu.org/licenses/gpl.html - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * */ @@ -94,15 +94,19 @@ $StateHolder->setReturnReferenceScript($_REQUEST['ref']); } - // Check if "Cancel" has been triggered, leave script - if (isset($_POST['submit']) && $_POST['submit'] == 'Cancel') { - session_destroy(); - redirectTo('../'); - } + // Check if "Cancel" or "Finish" has been triggered, leave script + if (isset($_POST['submit'])) { + + if ($_POST['submit'] == 'Cancel' || $_POST['submit'] == 'Finish') { - // Check if "Finish" has been triggered, leave script - if (isset($_POST['submit']) && $_POST['submit'] == 'Finish') { + // Check if we have a non-standard return target. E.g. if the + // installer has been called from the administration area. + if ($StateHolder->getReturnReferenceScript() != '') { + redirectTo('../' . $StateHolder->getReturnReferenceScript()); + } else { redirectTo('../'); + } + } } // --------------------------------------------------------------------