From 7327499064ae165468c7440f8571c3e570b58a0b Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 5 May 2008 16:39:18 +0000 Subject: Added get_dir_file_info(), get_file_info(), and get_mime_by_extension() to the File Helper. Changed ( ! condition) into (! condition) within the code --- system/database/DB.php | 10 ++--- system/database/DB_active_rec.php | 44 +++++++++++----------- system/database/DB_cache.php | 10 ++--- system/database/DB_driver.php | 40 ++++++++++---------- system/database/DB_result.php | 6 +-- system/database/DB_utility.php | 10 ++--- system/database/drivers/mssql/mssql_driver.php | 6 +-- system/database/drivers/mysql/mysql_driver.php | 6 +-- system/database/drivers/mysqli/mysqli_driver.php | 6 +-- system/database/drivers/oci8/oci8_driver.php | 12 +++--- system/database/drivers/odbc/odbc_driver.php | 6 +-- system/database/drivers/postgre/postgre_driver.php | 6 +-- system/database/drivers/sqlite/sqlite_driver.php | 10 ++--- system/database/drivers/sqlite/sqlite_forge.php | 2 +- system/database/drivers/sqlite/sqlite_utility.php | 2 +- 15 files changed, 88 insertions(+), 88 deletions(-) (limited to 'system/database') diff --git a/system/database/DB.php b/system/database/DB.php index 16ca1c888..8efe05560 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -29,7 +29,7 @@ function &DB($params = '', $active_record_override = FALSE) { include(APPPATH.'config/database'.EXT); - if ( ! isset($db) OR count($db) == 0) + if (! isset($db) OR count($db) == 0) { show_error('No database connection settings were found in the database config file.'); } @@ -39,7 +39,7 @@ function &DB($params = '', $active_record_override = FALSE) $active_group = $params; } - if ( ! isset($active_group) OR ! isset($db[$active_group])) + if (! isset($active_group) OR ! isset($db[$active_group])) { show_error('You have specified an invalid database connection group.'); } @@ -71,7 +71,7 @@ function &DB($params = '', $active_record_override = FALSE) } // No DB specified yet? Beat them senseless... - if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '') + if (! isset($params['dbdriver']) OR $params['dbdriver'] == '') { show_error('You have not selected a database type to connect to.'); } @@ -92,14 +92,14 @@ function &DB($params = '', $active_record_override = FALSE) { require_once(BASEPATH.'database/DB_active_rec'.EXT); - if ( ! class_exists('CI_DB')) + if (! class_exists('CI_DB')) { eval('class CI_DB extends CI_DB_active_record { }'); } } else { - if ( ! class_exists('CI_DB')) + if (! class_exists('CI_DB')) { eval('class CI_DB extends CI_DB_driver { }'); } diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 6f50c110d..1820bd202 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -315,7 +315,7 @@ class CI_DB_active_record extends CI_DB_driver { { $type = strtoupper(trim($type)); - if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE)) + if (! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE)) { $type = ''; } @@ -411,7 +411,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function _where($key, $value = NULL, $type = 'AND ', $escape = TRUE) { - if ( ! is_array($key)) + if (! is_array($key)) { $key = array($key => $value); } @@ -420,13 +420,13 @@ class CI_DB_active_record extends CI_DB_driver { { $prefix = (count($this->ar_where) == 0) ? '' : $type; - if ( ! $this->_has_operator($k) && is_null($key[$k])) + if (! $this->_has_operator($k) && is_null($key[$k])) { // value appears not to have been set, assign the test to IS NULL $k .= ' IS NULL'; } - if ( ! is_null($v)) + if (! is_null($v)) { if ($escape === TRUE) @@ -442,7 +442,7 @@ class CI_DB_active_record extends CI_DB_driver { } } - if ( ! $this->_has_operator($k)) + if (! $this->_has_operator($k)) { $k .= ' ='; } @@ -690,7 +690,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '') { - if ( ! is_array($field)) + if (! is_array($field)) { $field = array($field => $match); } @@ -832,7 +832,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function _having($key, $value = '', $type = 'AND ', $escape = TRUE) { - if ( ! is_array($key)) + if (! is_array($key)) { $key = array($key => $value); } @@ -972,7 +972,7 @@ class CI_DB_active_record extends CI_DB_driver { { $key = $this->_object_to_array($key); - if ( ! is_array($key)) + if (! is_array($key)) { $key = array($key => $value); } @@ -1022,7 +1022,7 @@ class CI_DB_active_record extends CI_DB_driver { $this->from($table); } - if ( ! is_null($limit)) + if (! is_null($limit)) { $this->limit($limit, $offset); } @@ -1087,12 +1087,12 @@ class CI_DB_active_record extends CI_DB_driver { $this->from($table); } - if ( ! is_null($where)) + if (! is_null($where)) { $this->where($where); } - if ( ! is_null($limit)) + if (! is_null($limit)) { $this->limit($limit, $offset); } @@ -1130,7 +1130,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function insert($table = '', $set = NULL) { - if ( ! is_null($set)) + if (! is_null($set)) { $this->set($set); } @@ -1146,7 +1146,7 @@ class CI_DB_active_record extends CI_DB_driver { if ($table == '') { - if ( ! isset($this->ar_from[0])) + if (! isset($this->ar_from[0])) { if ($this->db_debug) { @@ -1179,7 +1179,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function update($table = '', $set = NULL, $where = NULL, $limit = NULL) { - if ( ! is_null($set)) + if (! is_null($set)) { $this->set($set); } @@ -1195,7 +1195,7 @@ class CI_DB_active_record extends CI_DB_driver { if ($table == '') { - if ( ! isset($this->ar_from[0])) + if (! isset($this->ar_from[0])) { if ($this->db_debug) { @@ -1238,7 +1238,7 @@ class CI_DB_active_record extends CI_DB_driver { { if ($table == '') { - if ( ! isset($this->ar_from[0])) + if (! isset($this->ar_from[0])) { if ($this->db_debug) { @@ -1279,7 +1279,7 @@ class CI_DB_active_record extends CI_DB_driver { { if ($table == '') { - if ( ! isset($this->ar_from[0])) + if (! isset($this->ar_from[0])) { if ($this->db_debug) { @@ -1321,7 +1321,7 @@ class CI_DB_active_record extends CI_DB_driver { { if ($table == '') { - if ( ! isset($this->ar_from[0])) + if (! isset($this->ar_from[0])) { if ($this->db_debug) { @@ -1401,7 +1401,7 @@ class CI_DB_active_record extends CI_DB_driver { function _has_operator($str) { $str = trim($str); - if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str)) + if (! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str)) { return FALSE; } @@ -1474,7 +1474,7 @@ class CI_DB_active_record extends CI_DB_driver { { $this->_merge_cache(); - $sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT '; + $sql = (! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT '; $sql .= (count($this->ar_select) == 0) ? '*' : implode(', ', $this->_filter_table_aliases($this->ar_select)); @@ -1577,7 +1577,7 @@ class CI_DB_active_record extends CI_DB_driver { */ function _object_to_array($object) { - if ( ! is_object($object)) + if (! is_object($object)) { return $object; } @@ -1586,7 +1586,7 @@ class CI_DB_active_record extends CI_DB_driver { foreach (get_object_vars($object) as $key => $val) { // There are some built in keys we need to ignore for this conversion - if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table') + if (! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table') { $array[$key] = $val; diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 08394da29..982725aaa 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -64,7 +64,7 @@ class CI_DB_Cache { // Add a trailing slash to the path if needed $path = preg_replace("/(.+?)\/*$/", "\\1/", $path); - if ( ! is_dir($path) OR ! is_really_writable($path)) + if (! is_dir($path) OR ! is_really_writable($path)) { // If the path is wrong we'll turn off caching return $this->CI->db->cache_off(); @@ -87,7 +87,7 @@ class CI_DB_Cache { */ function read($sql) { - if ( ! $this->check_path()) + if (! $this->check_path()) { return $this->CI->db->cache_off(); } @@ -115,7 +115,7 @@ class CI_DB_Cache { */ function write($sql, $object) { - if ( ! $this->check_path()) + if (! $this->check_path()) { return $this->CI->db->cache_off(); } @@ -127,9 +127,9 @@ class CI_DB_Cache { $filename = md5($sql); - if ( ! @is_dir($dir_path)) + if (! @is_dir($dir_path)) { - if ( ! @mkdir($dir_path, DIR_WRITE_MODE)) + if (! @mkdir($dir_path, DIR_WRITE_MODE)) { return FALSE; } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index b1013178e..0f3a1ea0a 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -107,7 +107,7 @@ class CI_DB_driver { $this->conn_id = ($this->pconnect == FALSE) ? $this->db_connect() : $this->db_pconnect(); // No connection? Throw an error - if ( ! $this->conn_id) + if (! $this->conn_id) { log_message('error', 'Unable to connect to the database'); @@ -121,7 +121,7 @@ class CI_DB_driver { // Select the database if ($this->database != '') { - if ( ! $this->db_select()) + if (! $this->db_select()) { // Should we attempt to create the database? if ($create_db == TRUE) @@ -131,7 +131,7 @@ class CI_DB_driver { $CI->load->dbutil(); // Create the DB - if ( ! $CI->dbutil->create_database($this->database)) + if (! $CI->dbutil->create_database($this->database)) { log_message('error', 'Unable to create database: '.$this->database); @@ -401,7 +401,7 @@ class CI_DB_driver { { $driver = 'CI_DB_'.$this->dbdriver.'_result'; - if ( ! class_exists($driver)) + if (! class_exists($driver)) { include_once(BASEPATH.'database/DB_result'.EXT); include_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result'.EXT); @@ -424,7 +424,7 @@ class CI_DB_driver { */ function simple_query($sql) { - if ( ! $this->conn_id) + if (! $this->conn_id) { $this->initialize(); } @@ -456,7 +456,7 @@ class CI_DB_driver { */ function trans_start($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return FALSE; } @@ -481,7 +481,7 @@ class CI_DB_driver { */ function trans_complete() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return FALSE; } @@ -539,7 +539,7 @@ class CI_DB_driver { return $sql; } - if ( ! is_array($binds)) + if (! is_array($binds)) { $binds = array($binds); } @@ -576,7 +576,7 @@ class CI_DB_driver { */ function is_write_type($sql) { - if ( ! preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql)) + if (! preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql)) { return FALSE; } @@ -683,7 +683,7 @@ class CI_DB_driver { { $fields = $this->list_fields($table); - if ( ! is_array($fields)) + if (! is_array($fields)) { return FALSE; } @@ -747,7 +747,7 @@ class CI_DB_driver { */ function table_exists($table_name) { - return ( ! in_array($this->prep_tablename($table_name), $this->list_tables())) ? FALSE : TRUE; + return (! in_array($this->prep_tablename($table_name), $this->list_tables())) ? FALSE : TRUE; } // -------------------------------------------------------------------- @@ -815,7 +815,7 @@ class CI_DB_driver { */ function field_exists($field_name, $table_name) { - return ( ! in_array($field_name, $this->list_fields($table_name))) ? FALSE : TRUE; + return (! in_array($field_name, $this->list_fields($table_name))) ? FALSE : TRUE; } // -------------------------------------------------------------------- @@ -899,7 +899,7 @@ class CI_DB_driver { $fields[$key] = $this->escape($val); } - if ( ! is_array($where)) + if (! is_array($where)) { $dest = array($where); } @@ -912,7 +912,7 @@ class CI_DB_driver { if ($val !== '') { - if ( ! $this->_has_operator($key)) + if (! $this->_has_operator($key)) { $key .= ' ='; } @@ -969,7 +969,7 @@ class CI_DB_driver { $function = $driver.$function; } - if ( ! function_exists($function)) + if (! function_exists($function)) { if ($this->db_debug) { @@ -1038,7 +1038,7 @@ class CI_DB_driver { */ function cache_delete($segment_one = '', $segment_two = '') { - if ( ! $this->_cache_init()) + if (! $this->_cache_init()) { return FALSE; } @@ -1055,7 +1055,7 @@ class CI_DB_driver { */ function cache_delete_all() { - if ( ! $this->_cache_init()) + if (! $this->_cache_init()) { return FALSE; } @@ -1078,7 +1078,7 @@ class CI_DB_driver { return TRUE; } - if ( ! @include(BASEPATH.'database/DB_cache'.EXT)) + if (! @include(BASEPATH.'database/DB_cache'.EXT)) { return $this->cache_off(); } @@ -1129,10 +1129,10 @@ class CI_DB_driver { } else { - $message = ( ! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error; + $message = (! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error; } - if ( ! class_exists('CI_Exceptions')) + if (! class_exists('CI_Exceptions')) { // include(BASEPATH.'core/Exceptions'.EXT); include(BASEPATH.'libraries/Exceptions'.EXT); diff --git a/system/database/DB_result.php b/system/database/DB_result.php index c2eeefb94..cfe9d2a32 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -125,10 +125,10 @@ class CI_DB_result { */ function row($n = 0, $type = 'object') { - if ( ! is_numeric($n)) + if (! is_numeric($n)) { // We cache the row data for subsequent uses - if ( ! is_array($this->row_data)) + if (! is_array($this->row_data)) { $this->row_data = $this->row_array(0); } @@ -156,7 +156,7 @@ class CI_DB_result { function set_row($key, $value = NULL) { // We cache the row data for subsequent uses - if ( ! is_array($this->row_data)) + if (! is_array($this->row_data)) { $this->row_data = $this->row_array(0); } diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index d9b8fed74..11f1fb4de 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -175,7 +175,7 @@ class CI_DB_utility extends CI_DB_forge { */ function csv_from_result($query, $delim = ",", $newline = "\n", $enclosure = '"') { - if ( ! is_object($query) OR ! method_exists($query, 'field_names')) + if (! is_object($query) OR ! method_exists($query, 'field_names')) { show_error('You must submit a valid result object'); } @@ -217,7 +217,7 @@ class CI_DB_utility extends CI_DB_forge { */ function xml_from_result($query, $params = array()) { - if ( ! is_object($query) OR ! method_exists($query, 'field_names')) + if (! is_object($query) OR ! method_exists($query, 'field_names')) { show_error('You must submit a valid result object'); } @@ -225,7 +225,7 @@ class CI_DB_utility extends CI_DB_forge { // Set our default values foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val) { - if ( ! isset($params[$key])) + if (! isset($params[$key])) { $params[$key] = $val; } @@ -310,7 +310,7 @@ class CI_DB_utility extends CI_DB_forge { // ------------------------------------------------------ // Validate the format - if ( ! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE)) + if (! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE)) { $prefs['format'] = 'txt'; } @@ -367,7 +367,7 @@ class CI_DB_utility extends CI_DB_forge { } // Tack on the ".sql" file extension if needed - if ( ! preg_match("|.+?\.sql$|", $prefs['filename'])) + if (! preg_match("|.+?\.sql$|", $prefs['filename'])) { $prefs['filename'] .= '.sql'; } diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 1ed333de0..6e67c57c0 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -132,7 +132,7 @@ class CI_DB_mssql_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -162,7 +162,7 @@ class CI_DB_mssql_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -187,7 +187,7 @@ class CI_DB_mssql_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index f435c0bc4..f15983d2b 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -161,7 +161,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -192,7 +192,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -218,7 +218,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 6ff37f7e2..a196f755a 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -164,7 +164,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -195,7 +195,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -221,7 +221,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 364268b98..8fc20449f 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -155,7 +155,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function _set_stmt_id($sql) { - if ( ! is_resource($this->stmt_id)) + if (! is_resource($this->stmt_id)) { $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql)); } @@ -254,7 +254,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function _bind_params($params) { - if ( ! is_array($params) OR ! is_resource($this->stmt_id)) + if (! is_array($params) OR ! is_resource($this->stmt_id)) { return; } @@ -263,7 +263,7 @@ class CI_DB_oci8_driver extends CI_DB { { foreach (array('name', 'value', 'type', 'length') as $val) { - if ( ! isset($param[$val])) + if (! isset($param[$val])) { $param[$val] = ''; } @@ -283,7 +283,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -313,7 +313,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -339,7 +339,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 82fe36b5d..20e34ec7b 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -152,7 +152,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -181,7 +181,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -207,7 +207,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 4eff97fcc..46ba1d009 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -150,7 +150,7 @@ class CI_DB_postgre_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -179,7 +179,7 @@ class CI_DB_postgre_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -203,7 +203,7 @@ class CI_DB_postgre_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 2ad5d6120..70148f360 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -48,7 +48,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_connect() { - if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error)) + if (! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error)) { log_message('error', $error); @@ -73,7 +73,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_pconnect() { - if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error)) + if (! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error)) { log_message('error', $error); @@ -171,7 +171,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function trans_begin($test_mode = FALSE) { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -201,7 +201,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function trans_commit() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } @@ -226,7 +226,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function trans_rollback() { - if ( ! $this->trans_enabled) + if (! $this->trans_enabled) { return TRUE; } diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 1fd2a2bd4..44950bfc7 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -49,7 +49,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { */ function _drop_database($name) { - if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database)) + if (! @file_exists($this->db->database) OR ! @unlink($this->db->database)) { if ($this->db->db_debug) { diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index d1e1fe026..ab58f8fd7 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -124,7 +124,7 @@ class CI_DB_sqlite_utility extends CI_DB_utility { */ function _drop_database($name) { - if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database)) + if (! @file_exists($this->db->database) OR ! @unlink($this->db->database)) { if ($this->db->db_debug) { -- cgit v1.2.3-24-g4f1b