From 19e1217db2e534d81abfd11fd4bed18516828bf8 Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sat, 7 Feb 2015 11:17:08 +0100 Subject: Fix unreachable code --- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 10 +++++----- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index c8d7c770d..09b48f124 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -154,17 +154,17 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { */ protected function _list_tables($prefix_limit = FALSE) { - return 'SELECT '.$this->escape_identifiers('name') - .' FROM '.$this->escape_identifiers('sysobjects') - .' WHERE '.$this->escape_identifiers('type')." = 'U'"; + $sql = 'SELECT '.$this->escape_identifiers('name') + .' FROM '.$this->escape_identifiers('sysobjects') + .' WHERE '.$this->escape_identifiers('type')." = 'U'"; if ($prefix_limit === TRUE && $this->dbprefix !== '') { $sql .= ' AND '.$this->escape_identifiers('name')." LIKE '".$this->escape_like_str($this->dbprefix)."%' " - .sprintf($this->_like_escape_str, $this->_like_escape_chr); + .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql.' ORDER BY '.$this->escape_identifiers('name'); + return $sql .= ' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index b5bdbf91a..d366d119c 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -183,17 +183,17 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { */ protected function _list_tables($prefix_limit = FALSE) { - return 'SELECT '.$this->escape_identifiers('name') - .' FROM '.$this->escape_identifiers('sysobjects') - .' WHERE '.$this->escape_identifiers('type')." = 'U'"; + $sql = 'SELECT '.$this->escape_identifiers('name') + .' FROM '.$this->escape_identifiers('sysobjects') + .' WHERE '.$this->escape_identifiers('type')." = 'U'"; if ($prefix_limit === TRUE && $this->dbprefix !== '') { $sql .= ' AND '.$this->escape_identifiers('name')." LIKE '".$this->escape_like_str($this->dbprefix)."%' " - .sprintf($this->_like_escape_str, $this->_like_escape_chr); + .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql.' ORDER BY '.$this->escape_identifiers('name'); + return $sql .= ' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 3a486f19dfe79378d21c6b45579923cc86be0cb5 Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sat, 7 Feb 2015 19:08:44 +0100 Subject: Revert indentation --- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 8 ++++---- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 09b48f124..c6ef96307 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -155,16 +155,16 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') - .' FROM '.$this->escape_identifiers('sysobjects') - .' WHERE '.$this->escape_identifiers('type')." = 'U'"; + .' FROM '.$this->escape_identifiers('sysobjects') + .' WHERE '.$this->escape_identifiers('type')." = 'U'"; if ($prefix_limit === TRUE && $this->dbprefix !== '') { $sql .= ' AND '.$this->escape_identifiers('name')." LIKE '".$this->escape_like_str($this->dbprefix)."%' " - .sprintf($this->_like_escape_str, $this->_like_escape_chr); + .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql .= ' ORDER BY '.$this->escape_identifiers('name'); + return $sql .' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index d366d119c..eb0777316 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -184,16 +184,16 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') - .' FROM '.$this->escape_identifiers('sysobjects') - .' WHERE '.$this->escape_identifiers('type')." = 'U'"; + .' FROM '.$this->escape_identifiers('sysobjects') + .' WHERE '.$this->escape_identifiers('type')." = 'U'"; if ($prefix_limit === TRUE && $this->dbprefix !== '') { $sql .= ' AND '.$this->escape_identifiers('name')." LIKE '".$this->escape_like_str($this->dbprefix)."%' " - .sprintf($this->_like_escape_str, $this->_like_escape_chr); + .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql .= ' ORDER BY '.$this->escape_identifiers('name'); + return $sql .' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 96901ff3849c19351c7382689e6a970629586aae Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sat, 7 Feb 2015 19:12:56 +0100 Subject: Remove unnecessary return --- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 98ac89f3d..5d74f57a7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -113,7 +113,7 @@ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; -- cgit v1.2.3-24-g4f1b From 3053ded760a9657bdc7b935beb61d2f632859928 Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sat, 7 Feb 2015 19:17:39 +0100 Subject: Remove unnecessary return --- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 3bd5c9354..bb2e28280 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -120,7 +120,7 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql.' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + $sql .' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 67dc5f5ec..8065b367c 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -170,7 +170,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index d17e311f7..c85a4a235 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -143,7 +143,7 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql.' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + $sql .' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 51c70b630..ab471d6fd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -174,7 +174,7 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " + $sql ." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 2dd41ca87..11decab92 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -228,7 +228,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql.' AND "table_name" LIKE \'' + $sql .' AND "table_name" LIKE \'' .$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index f07f49f84..e25bec067 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -111,7 +111,7 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - return $sql.' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + $sql .' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } -- cgit v1.2.3-24-g4f1b From 843d2506e1a1eab17b871bc38b204d27047c9ff7 Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sat, 7 Feb 2015 20:02:40 +0100 Subject: Remove unnecessary return --- system/database/drivers/cubrid/cubrid_driver.php | 2 +- system/database/drivers/ibase/ibase_driver.php | 2 +- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/oci8/oci8_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- system/database/drivers/postgre/postgre_driver.php | 2 +- system/database/drivers/sqlite/sqlite_driver.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 402117978..74b8d99c4 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -318,7 +318,7 @@ class CI_DB_cubrid_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 529c320cd..fa04ad5ca 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -234,7 +234,7 @@ class CI_DB_ibase_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql.' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + $sql .' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index f8e9b6d61..d571c45c6 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -390,7 +390,7 @@ class CI_DB_mysql_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 22a8ba678..82c043427 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -375,7 +375,7 @@ class CI_DB_mysqli_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index b87b41112..ccd641950 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -494,7 +494,7 @@ class CI_DB_oci8_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql.' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + $sql .' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index f5d77a147..559617ae7 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -255,7 +255,7 @@ class CI_DB_odbc_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " + $sql ." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 3f3e3f018..8f72199e0 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -430,7 +430,7 @@ class CI_DB_postgre_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql.' AND "table_name" LIKE \'' + $sql .' AND "table_name" LIKE \'' .$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 9d9caa0b4..42dd9a705 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -233,7 +233,7 @@ class CI_DB_sqlite_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix != '') { - return $sql." AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); + $sql ." AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); } return $sql; -- cgit v1.2.3-24-g4f1b From 54e648b7bc65ea36a519f0a7b4407106e4f2756d Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sun, 8 Feb 2015 00:18:28 +0100 Subject: Revert "Remove unnecessary return" This reverts commit 843d2506e1a1eab17b871bc38b204d27047c9ff7. --- system/database/drivers/cubrid/cubrid_driver.php | 2 +- system/database/drivers/ibase/ibase_driver.php | 2 +- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/oci8/oci8_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- system/database/drivers/postgre/postgre_driver.php | 2 +- system/database/drivers/sqlite/sqlite_driver.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 74b8d99c4..402117978 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -318,7 +318,7 @@ class CI_DB_cubrid_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index fa04ad5ca..529c320cd 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -234,7 +234,7 @@ class CI_DB_ibase_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql .' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index d571c45c6..f8e9b6d61 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -390,7 +390,7 @@ class CI_DB_mysql_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 82c043427..22a8ba678 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -375,7 +375,7 @@ class CI_DB_mysqli_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index ccd641950..b87b41112 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -494,7 +494,7 @@ class CI_DB_oci8_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql .' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 559617ae7..f5d77a147 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -255,7 +255,7 @@ class CI_DB_odbc_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql ." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " + return $sql." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 8f72199e0..3f3e3f018 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -430,7 +430,7 @@ class CI_DB_postgre_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql .' AND "table_name" LIKE \'' + return $sql.' AND "table_name" LIKE \'' .$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 42dd9a705..9d9caa0b4 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -233,7 +233,7 @@ class CI_DB_sqlite_driver extends CI_DB { if ($prefix_limit !== FALSE && $this->dbprefix != '') { - $sql ." AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); + return $sql." AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); } return $sql; -- cgit v1.2.3-24-g4f1b From b4495898cacbaa1807da6f2a2117cf450fc4926c Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sun, 8 Feb 2015 00:18:37 +0100 Subject: Revert "Remove unnecessary return" This reverts commit 3053ded760a9657bdc7b935beb61d2f632859928. --- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index bb2e28280..3bd5c9354 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -120,7 +120,7 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql .' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 8065b367c..67dc5f5ec 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -170,7 +170,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index c85a4a235..d17e311f7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -143,7 +143,7 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql .' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' WHERE "TABLE_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index ab471d6fd..51c70b630 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -174,7 +174,7 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - $sql ." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " + return $sql." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 11decab92..2dd41ca87 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -228,7 +228,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql .' AND "table_name" LIKE \'' + return $sql.' AND "table_name" LIKE \'' .$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index e25bec067..f07f49f84 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -111,7 +111,7 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql .' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } -- cgit v1.2.3-24-g4f1b From cf932175c43a1003ac6b41893c2761b6685e6b90 Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sun, 8 Feb 2015 00:18:43 +0100 Subject: Revert "Remove unnecessary return" This reverts commit 96901ff3849c19351c7382689e6a970629586aae. --- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 5d74f57a7..98ac89f3d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -113,7 +113,7 @@ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver { if ($prefix_limit === TRUE && $this->dbprefix !== '') { - $sql ." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; + return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'"; } return $sql; -- cgit v1.2.3-24-g4f1b From 01e04a6125cfe280c15194cc11bc43a611d2c59b Mon Sep 17 00:00:00 2001 From: Gwenael Gallon Date: Sun, 8 Feb 2015 10:08:50 +0100 Subject: Deleted spaces --- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index c6ef96307..844ffab8f 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -164,7 +164,7 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql .' ORDER BY '.$this->escape_identifiers('name'); + return $sql.' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index eb0777316..f8ae5f6db 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -193,7 +193,7 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql .' ORDER BY '.$this->escape_identifiers('name'); + return $sql.' ORDER BY '.$this->escape_identifiers('name'); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b