Commit 38f1a185 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #72 from clean-master/add-php8-support

add php8 support
parents c253c786 67f82e66
......@@ -81,11 +81,7 @@ function getstart($start = 0,$mode = ''){
return $start;
}
function setconfig($string) {
if(!get_magic_quotes_gpc()) {
$string = str_replace('\'', '\\\'', $string);
} else {
$string = str_replace('\"', '"', $string);
}
$string = str_replace('\'', '\\\'', $string);
return $string;
}
......
......@@ -11,7 +11,7 @@ if(version_compare(PHP_VERSION, '4.3.0', '<')) {
}
require GAME_ROOT.'/include/global.func.php';
$magic_quotes_gpc = get_magic_quotes_gpc();
$magic_quotes_gpc = false;
extract(gstrfilter($_COOKIE));
extract(gstrfilter($_POST));
unset($_GET);
......
......@@ -15,7 +15,7 @@ require GAME_ROOT.'./include/game/revclubskills.func.php';
require GAME_ROOT.'./include/game/dice.func.php';
error_reporting(E_ALL);
set_error_handler('gameerrorhandler');
$magic_quotes_gpc = get_magic_quotes_gpc();
$magic_quotes_gpc = false;
extract(gstrfilter($_COOKIE));
extract(gstrfilter($_POST));
extract(gstrfilter($_GET));
......
......@@ -663,14 +663,14 @@ if(!$action) {
$quit = TRUE;
}
if(@ini_get(file_uploads)) {
$max_size = @ini_get(upload_max_filesize);
$curr_upload_status = $lang['attach_enabled'].$max_size;
$msg .= $lang['attach_enabled_info'].$max_size."\t";
} else {
$curr_upload_status = $lang['attach_disabled'];
$msg .= "<font color=\"#FF0000\">$lang[attach_disabled_info]</font>\t";
}
if(function_exists('ini_get') && ini_get('file_uploads')) {
$max_size = ini_get('upload_max_filesize');
$curr_upload_status = $lang['attach_enabled'].$max_size;
$msg .= $lang['attach_enabled_info'].$max_size."\t";
} else {
$curr_upload_status = $lang['attach_disabled'];
$msg .= "<font color=\"#FF0000\">$lang[attach_disabled_info]</font>\t";
}
$query = $db->query("SELECT VERSION()");
$curr_mysql_version = $db->result($query, 0);
......@@ -1308,11 +1308,7 @@ function createtable($db, $sql, $dbcharset) {
}
function setconfig($string) {
if(!get_magic_quotes_gpc()) {
$string = str_replace('\'', '\\\'', $string);
} else {
$string = str_replace('\"', '"', $string);
}
$string = str_replace('\'', '\\\'', $string);
return $string;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment