diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-01 18:23:02 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-01 18:23:02 +0100 |
commit | 8e22cfdc2fe626bed2a3e570bc71f25d61d6546c (patch) | |
tree | 8fac11c939596396b9b3fb4aae83e8cf58e147dd /system/database/DB_driver.php | |
parent | 3793517a9c5c7f2c829d5d56bc5754606fa421de (diff) | |
parent | ea3eec9f670ea861a65a3e251d8c518ff47e2506 (diff) |
Merge upstream changes
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index f1e9e7239..5f435e363 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -644,17 +644,12 @@ class CI_DB_driver { /** * Determines if a query is a "write" type. * - * @access public * @param string An SQL query string - * @return boolean + * @return bool */ - function is_write_type($sql) + public function is_write_type($sql) { - if ( ! preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql)) - { - return FALSE; - } - return TRUE; + return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|OPTIMIZE)\s+/i', $sql); } // -------------------------------------------------------------------- @@ -1423,6 +1418,22 @@ class CI_DB_driver { return $item.$alias; } + + // -------------------------------------------------------------------- + + /** + * Dummy method that allows Active Record class to be disabled + * + * This function is used extensively by every db driver. + * + * @access private + * @return void + */ + protected function _reset_select() + { + + } + } /* End of file DB_driver.php */ |