diff --git a/classes/db/DBCubrid3.class.php b/classes/db/DBCubrid3.class.php index 2c9c6c84a..a312c7de9 100644 --- a/classes/db/DBCubrid3.class.php +++ b/classes/db/DBCubrid3.class.php @@ -22,7 +22,8 @@ var $prefix = 'xe'; // / prefix = $db_info->db_table_prefix; if (!substr($this->prefix, -1) != '_') $this->prefix .= '_'; + $this->magic_quotes_enabled = (version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()); } /** @@ -123,21 +125,11 @@ { if (!$this->fd) return $string; - if (version_compare (PHP_VERSION, "5.9.0", "<") && - get_magic_quotes_gpc ()) { + if ($this->magic_quotes_enabled) { $string = stripslashes (str_replace ("\\","\\\\", $string)); } - if (!is_numeric ($string)) { - /* - if ($this->isConnected()) { - $string = cubrid_real_escape_string($string); - } - else { - $string = str_replace("'","\'",$string); - } - */ - + if (!is_numeric($string)) { $string = str_replace("'","''",$string); }