Skip to content

Commit

Permalink
Remove deprecated functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Studio384 committed Oct 26, 2020
1 parent d3a36c5 commit 0374e9b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 54 deletions.
16 changes: 0 additions & 16 deletions db_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,6 @@
// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings)
setlocale(LC_CTYPE, 'C');

// Turn off magic_quotes_runtime
if (get_magic_quotes_runtime())
set_magic_quotes_runtime(0);

// Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled)
if (get_magic_quotes_gpc()) {
function stripslashes_array($array) {
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
}

$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_COOKIE = stripslashes_array($_COOKIE);
$_REQUEST = stripslashes_array($_REQUEST);
}

// If a cookie name is not specified in config.php, we use the default (forum_cookie)
if (empty($cookie_name))
$cookie_name = 'luna_cookie';
Expand Down
22 changes: 0 additions & 22 deletions include/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,6 @@
// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings)
setlocale(LC_CTYPE, 'C');

// Turn off magic_quotes_runtime
if (get_magic_quotes_runtime())
set_magic_quotes_runtime(0);

// Strip slashes from GET/POST/COOKIE/REQUEST/FILES (if magic_quotes_gpc is enabled)
if (!defined('LUNA_DISABLE_STRIPSLASHES') && get_magic_quotes_gpc()) {
function stripslashes_array($array) {
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
}

$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_COOKIE = stripslashes_array($_COOKIE);
$_REQUEST = stripslashes_array($_REQUEST);
if (is_array($_FILES)) {
// Don't strip valid slashes from tmp_name path on Windows
foreach ($_FILES AS $key => $value)
$_FILES[$key]['tmp_name'] = str_replace('\\', '\\\\', $value['tmp_name']);
$_FILES = stripslashes_array($_FILES);
}
}

// If a cookie name is not specified in config.php, we use the default (luna_cookie)
if (empty($cookie_name))
$cookie_name = 'luna_cookie';
Expand Down
16 changes: 0 additions & 16 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@
// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings)
setlocale(LC_CTYPE, 'C');

// Turn off magic_quotes_runtime
if (get_magic_quotes_runtime())
set_magic_quotes_runtime(0);

// Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled)
if (get_magic_quotes_gpc()) {
function stripslashes_array($array) {
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
}

$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_COOKIE = stripslashes_array($_COOKIE);
$_REQUEST = stripslashes_array($_REQUEST);
}

// Turn off PHP time limit
@set_time_limit(0);

Expand Down

0 comments on commit 0374e9b

Please sign in to comment.