diff options
author | Andrey Andreev <narf@bofh.bg> | 2013-01-10 15:53:44 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2013-01-10 15:53:44 +0100 |
commit | 0b6a492ce1092172b9e3445e674ff9a344d33650 (patch) | |
tree | 280c17c507df5e9a82264bb437c0cd6088198ca8 /system/database/drivers/oci8 | |
parent | 7545ffd90647cd65aeaff2a21032a13140700c63 (diff) |
Unify escape_str() array input and LIKE logic
Added protected method _escape_str() to deal with quote escaping.
Diffstat (limited to 'system/database/drivers/oci8')
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 6a850b43e..0ec8b53b8 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -461,40 +461,6 @@ class CI_DB_oci8_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Escape String - * - * @param string $str - * @param bool $like Whether or not the string will be used in a LIKE condition - * @return string - */ - public function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - $str = str_replace("'", "''", remove_invisible_characters($str)); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - return str_replace(array($this->_like_escape_chr, '%', '_'), - array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** * Affected Rows * * @return int |