mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
issue:17149595
PHP6에서 magic_quotes_gpc 함수 사용안하도록 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4472 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1eee3363e5
commit
59c72699d4
8 changed files with 12 additions and 9 deletions
|
|
@ -489,12 +489,12 @@
|
|||
if($key == "page" || $key == "cpage" || substr($key,-3)=="srl") $val = (int)$val;
|
||||
else if(is_array($val) && count($val) ) {
|
||||
foreach($val as $k => $v) {
|
||||
if(get_magic_quotes_gpc()) $v = stripslashes($v);
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $v = stripslashes($v);
|
||||
$v = trim($v);
|
||||
$val[$k] = $v;
|
||||
}
|
||||
} else {
|
||||
if(get_magic_quotes_gpc()) $val = stripslashes($val);
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $val = stripslashes($val);
|
||||
$val = trim($val);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
**/
|
||||
function addQuotes($string) {
|
||||
if(!$this->fd) return $string;
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = str_replace("'","''",$string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
|
||||
**/
|
||||
function addQuotes($string) {
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = @mysql_escape_string($string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
|
||||
**/
|
||||
function addQuotes($string) {
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = @mysql_escape_string($string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
|
||||
**/
|
||||
function addQuotes($string) {
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = @pg_escape_string($string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
|
||||
**/
|
||||
function addQuotes($string) {
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = str_replace("'","''", $string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
|
||||
**/
|
||||
function addQuotes($string) {
|
||||
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
|
||||
if(!is_numeric($string)) $string = str_replace("'","''",$string);
|
||||
return $string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,10 @@
|
|||
}
|
||||
fclose($socket);
|
||||
|
||||
return array($code, $body);
|
||||
$ret->result_code = $code;
|
||||
$ret->body = $body;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue