mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
PHP 5.4 이상에서는 magic_quotes_gpc 상태를 체크하지 않음
This commit is contained in:
parent
799f6f3a67
commit
7f9aee3e71
8 changed files with 8 additions and 8 deletions
|
|
@ -1380,7 +1380,7 @@ class Context
|
||||||
{
|
{
|
||||||
$result[$k] = $v;
|
$result[$k] = $v;
|
||||||
|
|
||||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc())
|
if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$result[$k] = stripslashes($result[$k]);
|
$result[$k] = stripslashes($result[$k]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class DBCubrid extends DB
|
||||||
*/
|
*/
|
||||||
function addQuotes($string)
|
function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") &&
|
if(version_compare(PHP_VERSION, "5.4.0", "<") &&
|
||||||
get_magic_quotes_gpc())
|
get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ class DBMssql extends DB
|
||||||
*/
|
*/
|
||||||
function addQuotes($string)
|
function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ class DBMysql extends DB
|
||||||
*/
|
*/
|
||||||
function addQuotes($string)
|
function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class DBMysqli extends DBMysql
|
||||||
*/
|
*/
|
||||||
function addQuotes($string)
|
function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ class DBMysqli_innodb extends DBMysql
|
||||||
*/
|
*/
|
||||||
function addQuotes($string)
|
function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -685,7 +685,7 @@ class moduleAdminController extends module
|
||||||
$args->value = trim(Context::get($key));
|
$args->value = trim(Context::get($key));
|
||||||
|
|
||||||
// if request method is json, strip slashes
|
// if request method is json, strip slashes
|
||||||
if(Context::getRequestMethod() == 'JSON' && version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(Context::getRequestMethod() == 'JSON' && version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$args->value = stripslashes($args->value);
|
$args->value = stripslashes($args->value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ class DBMysqliConnectWrapper extends DBMysqli
|
||||||
*/
|
*/
|
||||||
public function addQuotes($string)
|
public function addQuotes($string)
|
||||||
{
|
{
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
|
||||||
{
|
{
|
||||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue