mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Remove deprecated
This commit is contained in:
parent
5675e7c50e
commit
c1f6b76a6a
|
|
@ -253,28 +253,7 @@ foreach ($handlers as $handler)
|
|||
if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler]=$loghandlerinstance;
|
||||
}
|
||||
|
||||
// Removed magic_quotes
|
||||
if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.4
|
||||
{
|
||||
if (get_magic_quotes_gpc())
|
||||
{
|
||||
// Forcing parameter setting magic_quotes_gpc and cleaning parameters
|
||||
// (Otherwise he would have for each position, condition
|
||||
// Reading stripslashes variable according to state get_magic_quotes_gpc).
|
||||
// Off mode (recommended, you just do $db->escape when an insert / update.
|
||||
function stripslashes_deep($value)
|
||||
{
|
||||
return (is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value));
|
||||
}
|
||||
$_GET = array_map('stripslashes_deep', $_GET);
|
||||
$_POST = array_map('stripslashes_deep', $_POST);
|
||||
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
|
||||
$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
|
||||
@set_magic_quotes_runtime(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Defini objet langs
|
||||
// Define object $langs
|
||||
$langs = new Translate('..', $conf);
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||
else $langs->setDefaultLang('auto');
|
||||
|
|
|
|||
|
|
@ -47,27 +47,6 @@ if (! empty($_SERVER['MAIN_SHOW_TUNING_INFO']))
|
|||
}
|
||||
}
|
||||
|
||||
// Removed magic_quotes
|
||||
if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* deprecated in PHP 5.0 and removed in PHP 5.5
|
||||
{
|
||||
if (get_magic_quotes_gpc())
|
||||
{
|
||||
// Forcing parameter setting magic_quotes_gpc and cleaning parameters
|
||||
// (Otherwise he would have for each position, condition
|
||||
// Reading stripslashes variable according to state get_magic_quotes_gpc).
|
||||
// Off mode recommended (just do $db->escape for insert / update).
|
||||
function stripslashes_deep($value)
|
||||
{
|
||||
return (is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value));
|
||||
}
|
||||
$_GET = array_map('stripslashes_deep', $_GET);
|
||||
$_POST = array_map('stripslashes_deep', $_POST);
|
||||
$_FILES = array_map('stripslashes_deep', $_FILES);
|
||||
//$_COOKIE = array_map('stripslashes_deep', $_COOKIE); // Useless because a cookie should never be outputed on screen nor used into sql
|
||||
@set_magic_quotes_runtime(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF).
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user