diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-25 14:21:41 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-25 14:21:41 +0100 |
commit | 2e171023bae38735ec08bbd9cb160cee75edbc62 (patch) | |
tree | 15327555ec2101f723f6ae35c6c388abf1b18317 /system/database/drivers/sqlite3 | |
parent | e7d017bcc38909f55e8f817b27263e59d1ca5598 (diff) |
Make db_pconnect an alias for db_connect(TRUE) and reduce code repetition
Diffstat (limited to 'system/database/drivers/sqlite3')
-rw-r--r-- | system/database/drivers/sqlite3/sqlite3_driver.php | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 30c38ec47..a7d0d087d 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -63,10 +63,16 @@ class CI_DB_sqlite3_driver extends CI_DB { /** * Non-persistent database connection * - * @return object type SQLite3 + * @param bool $persistent + * @return SQLite3 */ - public function db_connect() + public function db_connect($persistent = FALSE) { + if ($persistent) + { + log_message('debug', 'SQLite3 doesn\'t support persistent connections'); + } + try { return ( ! $this->password) @@ -82,19 +88,6 @@ class CI_DB_sqlite3_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Persistent database connection - * - * @return object type SQLite3 - */ - public function db_pconnect() - { - log_message('debug', 'SQLite3 doesn\'t support persistent connections'); - return $this->db_connect(); - } - - // -------------------------------------------------------------------- - - /** * Database version number * * @return string |