summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-22 18:45:08 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-22 18:45:08 +0100
commitcf8bb891df6f42850f57d715ab14af81c9fbd960 (patch)
tree302e0dc0bc12a847bcf6d3c778ac0ed1684b3642 /system
parenta286c8a837422b5f582c3c391dc2805a500b1532 (diff)
parente2675736f3a68b1f64e135d827f6a70e0ae892fb (diff)
Merge upstream branch
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_driver.php21
-rw-r--r--system/database/drivers/mysql/mysql_utility.php2
-rw-r--r--system/libraries/Cart.php7
3 files changed, 8 insertions, 22 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a3171e395..744bb3cd7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -166,26 +166,19 @@ class CI_DB_driver {
// ----------------------------------------------------------------
// Select the DB... assuming a database name is specified in the config file
- if ($this->database != '')
+ if ($this->database !== '' && ! $this->db_select())
{
- if ( ! $this->db_select())
- {
- log_message('error', 'Unable to select database: '.$this->database);
+ log_message('error', 'Unable to select database: '.$this->database);
- if ($this->db_debug)
- {
- $this->display_error('db_unable_to_select', $this->database);
- }
- return FALSE;
- }
- else
+ if ($this->db_debug)
{
- // We've selected the DB. Now we set the character set
- return $this->db_set_charset($this->char_set, $this->dbcollat);
+ $this->display_error('db_unable_to_select', $this->database);
}
+ return FALSE;
}
- return TRUE;
+ // Now we set the character set and that's all
+ return $this->db_set_charset($this->char_set, $this->dbcollat);
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php
index 9d7cb679c..952f887fe 100644
--- a/system/database/drivers/mysql/mysql_utility.php
+++ b/system/database/drivers/mysql/mysql_utility.php
@@ -115,7 +115,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
if ($add_drop == TRUE)
{
- $output .= 'DROP TABLE IF EXISTS '.($this->db->protect_identifiers($table).';'.$newline.$newline;
+ $output .= 'DROP TABLE IF EXISTS '.$this->db->protect_identifiers($table).';'.$newline.$newline;
}
$i = 0;
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index ba8d69be2..10b5362a5 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -329,13 +329,6 @@ class CI_Cart {
return FALSE;
}
- // Is the new quantity different than what is already saved in the cart?
- // If it's the same there's nothing to do
- if ($this->_cart_contents[$items['rowid']]['qty'] == $items['qty'])
- {
- return FALSE;
- }
-
// Is the quantity zero? If so we will remove the item from the cart.
// If the quantity is greater than zero we are updating
if ($items['qty'] == 0)