CVS update: /cowiki/htdocs/setup/
[email protected] 2 Aug 2005 22:14:03 -0000
| Newsgroups | gmane.comp.php.cowiki.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: dgorski Date: 2005/08/02 15:14:03 Modified: cowiki/htdocs/setup/index.php Log: Reuse version.compare.php code File Changes: Directory: /cowiki/htdocs/setup/ ================================ File [changed]: index.php Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/setup/index.php?r1=1.1&r2=1.2 Delta lines: +8 -29 -------------------- --- index.php 17 Apr 2005 00:30:44 -0000 1.1 +++ index.php 2 Aug 2005 22:14:01 -0000 1.2 @@ -2,7 +2,7 @@ /** * - * $Id: index.php,v 1.1 2005/04/17 00:30:44 dgorski Exp $ + * $Id: index.php,v 1.2 2005/08/02 22:14:01 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.1 $ + * @version $Revision: 1.2 $ * */ @@ -34,35 +34,14 @@ // -------------------------------------------------------------------- - define('SETUP_PATH', dirname($_SERVER['SCRIPT_FILENAME'])); + $sPath = dirname($_SERVER['SCRIPT_FILENAME']); // Include and init required files - include SETUP_PATH.'/function.php'; - include SETUP_PATH.'/../version.php'; + include_once $sPath . '/function.php'; + include_once $sPath . '/../version.php'; - if (version_compare(COWIKI_REQUIRED_PHP_VERSION, phpversion()) > 0) { - - echo '<html>'; - echo '<head>'; - echo '<title>'.COWIKI_FULL_NAME.'</title>'; - echo '<meta name="robots" content="noindex, nofollow">'; - echo '</head>'; - - echo '<h1>Emergency stop!</h1>'; - echo '<p>'; - echo 'The <b>'.COWIKI_FULL_NAME.'</b> software requires'; - echo ' <b>PHP '.COWIKI_REQUIRED_PHP_VERSION.'</b> to be'; - echo ' installed and configured for this virtual host.'; - echo '</p>'; - - echo '<p>'; - echo 'Your installation claims to be PHP version '.phpversion().'.'; - echo ' You will need to upgrade in order to make the software run.'; - echo '</p>'; - echo '</html>'; - - exit; - } + // Compares the version and emmits an error in browser if neccessary. + include_once $sPath . '/../version.compare.php'; // --------------------------------------------------------------------