From 88986de7bd3b9b39accb4406adee5ac301dcc108 Mon Sep 17 00:00:00 2001 From: "o.pinke" Date: Wed, 2 Sep 2020 10:10:13 +0200 Subject: [PATCH] new range for PHP --- setup/lib/defines.php | 33 +++++---------------------------- setup/lib/startup.php | 37 ++++++++++++++----------------------- 2 files changed, 19 insertions(+), 51 deletions(-) diff --git a/setup/lib/defines.php b/setup/lib/defines.php index 85bb996..192ca28 100644 --- a/setup/lib/defines.php +++ b/setup/lib/defines.php @@ -7,31 +7,8 @@ * * @package ConLite * @subpackage Setup - * @version $Rev$ - * @author - * @license http://www.gnu.de/documents/gpl-3.0.de.html GNU General Public License (GPL) - * @link http://conlite.conrepo.org ConLite Portal - * - * $Id$ - */ - -/** - * Project: - * Contenido Content Management System - * - * Description: - * - * Requirements: - * @con_php_req 5 - * - * - * @package Contenido Setup - * @version 0.2.1 - * @author unknown - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org + * @license https://www.gnu.de/documents/gpl-3.0.de.html GNU General Public License (GPL) + * @link https://conlite.org ConLite Portal */ if (!defined('CON_FRAMEWORK')) { @@ -56,6 +33,6 @@ define('C_SETUP_STEPFILE', 'images/steps/s%d.png'); define('C_SETUP_STEPFILE_ACTIVE', 'images/steps/s%da.png'); define('C_SETUP_STEPWIDTH', 28); define('C_SETUP_STEPHEIGHT', 28); -define('C_SETUP_MIN_PHP_VERSION', '5.6'); -define('C_SETUP_VERSION', '2.1.1'); -?> \ No newline at end of file +define('C_SETUP_MIN_PHP_VERSION', '7.0.0'); +define('C_SETUP_MAX_PHP_VERSION', '8.0.0'); +define('C_SETUP_VERSION', '2.1.2'); \ No newline at end of file diff --git a/setup/lib/startup.php b/setup/lib/startup.php index 5bc51c1..7ea3cee 100644 --- a/setup/lib/startup.php +++ b/setup/lib/startup.php @@ -1,25 +1,14 @@ - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.8.15 - * - * $Id$ + * startup.php + * + * startup file for conlite setup + * + * + * @package ConLite + * @subpackage Setup + * @license https://www.gnu.de/documents/gpl-3.0.de.html GNU General Public License (GPL) + * @link https://conlite.org ConLite Portal */ if (!defined('CON_FRAMEWORK')) { @@ -27,6 +16,8 @@ if (!defined('CON_FRAMEWORK')) { } define('CON_BE_PATH', '../conlite/'); +require_once dirname(__FILE__).'/defines.php'; + // uncomment this lines during development if needed error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", true); @@ -36,13 +27,13 @@ ini_set("error_log", "../data/logs/setup_errorlog.txt"); header('Content-Type: text/html; charset=UTF-8'); // Check php version -if (version_compare(PHP_VERSION, '7.0.0', '<')) { +if (version_compare(PHP_VERSION, C_SETUP_MIN_PHP_VERSION, '<')) { die("You need PHP >= 7.0.0 to install ConLite 2.1. Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n"); } // Check version //PHP >= 7.0.0 and < 7.4 -if (version_compare(PHP_VERSION, '7.4.0', '>=')) { +if (version_compare(PHP_VERSION, C_SETUP_MAX_PHP_VERSION, '>=')) { die("You need PHP >= 7.0 and < 7.4 to install ConLite 2.1. Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n"); } @@ -105,7 +96,7 @@ $cfg['native_i18n'] = false; session_start(); // includes -checkAndInclude('lib/defines.php'); +//checkAndInclude('lib/defines.php'); checkAndInclude($cfg['path']['frontend'].'/pear/HTML/Common2.php'); checkAndInclude($cfg['path']['conlite'] . 'classes/cHTML5/class.chtml.php'); checkAndInclude($cfg['path']['conlite'] . 'classes/class.htmlelements.php');