mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-19 00:01:00 +08:00
fix php8 compatibility
This commit is contained in:
@@ -3,10 +3,6 @@ if(!defined('IN_TRACKER'))
|
||||
die('Hacking attempt!');
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
ini_set('display_errors', $TWEAK['display_errors']);
|
||||
//include_once($rootpath . 'classes/class_cache.php'); //Require the caching class
|
||||
//$Cache = NEW CACHE(); //Load the caching class
|
||||
//@todo
|
||||
include_once($rootpath . 'classes/class_cache_redis.php'); //Require the caching class
|
||||
$Cache = new RedisCache(); //Load the caching class
|
||||
$Cache->setLanguageFolderArray(get_langfolder_list());
|
||||
define('TIMENOW', time());
|
||||
@@ -26,43 +22,10 @@ define ("UC_NEXUS_MASTER", 9);
|
||||
define ("UC_VIP", 10);
|
||||
define ("UC_RETIREE",11);
|
||||
define ("UC_UPLOADER",12);
|
||||
//define ("UC_FORUM_MODERATOR", 12);
|
||||
define ("UC_FORUM_MODERATOR", 12);
|
||||
define ("UC_MODERATOR",13);
|
||||
define ("UC_ADMINISTRATOR",14);
|
||||
define ("UC_SYSOP",15);
|
||||
define ("UC_STAFFLEADER",16);
|
||||
ignore_user_abort(1);
|
||||
@set_time_limit(60);
|
||||
|
||||
function strip_magic_quotes($arr)
|
||||
{
|
||||
foreach ($arr as $k => $v)
|
||||
{
|
||||
if (is_array($v))
|
||||
{
|
||||
$arr[$k] = strip_magic_quotes($v);
|
||||
} else {
|
||||
$arr[$k] = stripslashes($v);
|
||||
}
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
|
||||
{
|
||||
if (!empty($_GET)) {
|
||||
$_GET = strip_magic_quotes($_GET);
|
||||
}
|
||||
if (!empty($_POST)) {
|
||||
$_POST = strip_magic_quotes($_POST);
|
||||
}
|
||||
if (!empty($_COOKIE)) {
|
||||
$_COOKIE = strip_magic_quotes($_COOKIE);
|
||||
}
|
||||
}
|
||||
|
||||
function get_langfolder_list()
|
||||
{
|
||||
//do not access db for speed up, or for flexibility
|
||||
return array("en", "chs", "cht", "ko", "ja");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user