delete old magic quotes stuff
This commit is contained in:
parent
07823cea01
commit
c7e1e2ce9a
43
lib.php
43
lib.php
|
@ -5,49 +5,6 @@ $numqueries = 0;
|
|||
$version = "1.1.11";
|
||||
$build = "";
|
||||
|
||||
// Handling for servers with magic_quotes turned on.
|
||||
// Example from php.net.
|
||||
if (get_magic_quotes_gpc()) {
|
||||
|
||||
$_POST = array_map('stripslashes_deep', $_POST);
|
||||
$_GET = array_map('stripslashes_deep', $_GET);
|
||||
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
|
||||
|
||||
}
|
||||
$_POST = array_map('addslashes_deep', $_POST);
|
||||
$_POST = array_map('html_deep', $_POST);
|
||||
$_GET = array_map('addslashes_deep', $_GET);
|
||||
$_GET = array_map('html_deep', $_GET);
|
||||
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
|
||||
$_COOKIE = array_map('html_deep', $_COOKIE);
|
||||
|
||||
function stripslashes_deep($value) {
|
||||
|
||||
$value = is_array($value) ?
|
||||
array_map('stripslashes_deep', $value) :
|
||||
stripslashes($value);
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
function addslashes_deep($value) {
|
||||
|
||||
$value = is_array($value) ?
|
||||
array_map('addslashes_deep', $value) :
|
||||
addslashes($value);
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
function html_deep($value) {
|
||||
|
||||
$value = is_array($value) ?
|
||||
array_map('html_deep', $value) :
|
||||
htmlspecialchars($value);
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
function opendb() { // Open database connection.
|
||||
|
||||
include('config.php');
|
||||
|
|
Loading…
Reference in New Issue
Block a user