diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-03-01 15:40:37 +0100 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-03-01 15:40:37 +0100 |
commit | a0da0b28bdb0ff73d5c0d9f8780ab0f6d74f39e3 (patch) | |
tree | 67b3789312fb4056352d83432c60644648c9feac /system/database/DB_driver.php | |
parent | 7842b1bc8cc007521dcc55de613d6e3224cfe2c1 (diff) | |
parent | ed7408282e9fded97ade222f98b43623a0f17d22 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into firebird
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 4be01cff4..09273baf0 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -645,17 +645,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); } // -------------------------------------------------------------------- |