diff --git a/conlite/includes/functions.php54.php b/conlite/includes/functions.php54.php deleted file mode 100644 index f037d44..0000000 --- a/conlite/includes/functions.php54.php +++ /dev/null @@ -1,132 +0,0 @@ - - * @copyright (c) 2014, www.conlite.org - * @version $Rev$ - * - * $Id$ - */ - -// security -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * - * @return string - */ -function clCheckForPhp54() { - if(!defined("CL_PHP54")) { - /** - * PHP-version equal or greater PHP 5.4 - * @constant CL_PHP54 phpversion >= 5.4 - */ - define('CL_PHP54', version_compare(PHP_VERSION, '5.4.0', '>=') ? 1:0); - } - return CL_PHP54; -} - -function clPhp54FixedFunc($funcname, $value, $flags = '', $encoding = '') { - if(clCheckForPhp54()) { - if($funcname == "get_html_translation_table") { - $value = ($value == '') ? HTML_SPECIALCHARS : $value; - } - $flags = (empty($flags))?ENT_COMPAT|ENT_HTML401:$flags; - $encoding = (empty($encoding))?'ISO-8859-1':$encoding; - } else { - $flags = (empty($flags))?ENT_COMPAT:$flags; - } - - if($funcname == "get_html_translation_table") { - return $funcname($value, $flags); - } else { - return $funcname($value, $flags, $encoding); - } -} - -/** - * - * @uses clPhp54FixedFunc multi fix func for PHP5.4 - * @author Ortwin Pinke - * - * @param string $value - * @param mixed $flags - * @param string $encoding - * @return string - */ -/* -function clHtmlSpecialChars($value, $flags = '', $encoding = '') { - return clPhp54FixedFunc("htmlspecialchars", $value, $flags, $encoding); -} -*/ -/** - * - * @uses clPhp54FixedFunc multi fix func for PHP5.4 - * @author Ortwin Pinke - * - * @param string $value - * @param mixed $flags - * @param string $encoding - * @return string - */ -/* -function clHtmlEntityDecode($value, $flags = '', $encoding = '') { - return clPhp54FixedFunc("html_entity_decode", $value, $flags, $encoding); -} - * - */ - -/** - * - * @uses clPhp54FixedFunc multi fix func for PHP5.4 - * @author Ortwin Pinke - * - * @param string $value - * @param mixed $flags - * @param string $encoding - * @return string - */ -/* -function clHtmlEntities($value, $flags = '', $encoding = '') { - return clPhp54FixedFunc("htmlentities", $value, $flags, $encoding); -} - * - */ - -/** - * - * @uses clPhp54FixedFunc multi fix func for PHP5.4 - * @author Ortwin Pinke - * - * @param string $table - * @param mixed $flags - * @return string - */ -/* -function clGetHtmlTranslationTable($table = '', $flags = '') { - return clPhp54FixedFunc("get_html_translation_table", $table, $flags); -} - * - */ - - -// hold old functions from con 4.8 but use new ConLite functions, mark them as deprecated - -/** - * Use compatible clHtmlSpecialChars instead - * @deprecated since version 2.0 - */ -/** -if (function_exists('conHtmlSpecialChars') == false) { - function conHtmlSpecialChars($value, $flags = '', $encoding = '') { - return clHtmlSpecialChars($value, $flags, $encoding); - } -} - * - */ \ No newline at end of file diff --git a/conlite/includes/functions.php73.php b/conlite/includes/functions.php73.php deleted file mode 100644 index f40d910..0000000 --- a/conlite/includes/functions.php73.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright (c) 2019, conlite.org - * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) - * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) - * @link http://www.conlite.org ConLite.org - * - * $Id$ - */ -// security check -defined('CON_FRAMEWORK') or die('Illegal call'); - - -if (!function_exists('is_countable')) { - - /** - * Verify that the contents of a variable is a countable value - *

Verify that the contents of a variable is an array or an object implementing Countable

- * @param mixed $var

The value to check

- * @return bool

Returns TRUE if var is countable, FALSE otherwise.

- * @link http://php.net/manual/en/function.is-countable.php - * - * @param Countable $var - * @return boolean - */ - function is_countable($var) { - return (is_array($var) || $var instanceof Countable); - } - -} \ No newline at end of file diff --git a/conlite/includes/startup.php b/conlite/includes/startup.php index 034fc86..5eca71e 100644 --- a/conlite/includes/startup.php +++ b/conlite/includes/startup.php @@ -75,13 +75,6 @@ define('CL_VERSION', '3.0.0 RC'); } -// fixed functions for PHP 5.4 and later -// @todo: Check what is needed for PHP7+ -include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php54.php'); - -// simulate PHP 7.3 functions -include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php73.php'); - // 1. security check: Include security class and invoke basic request checks include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php'); try {