summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cart.php
diff options
context:
space:
mode:
authorGreg Aker <greg@gregaker.net>2011-08-20 20:58:37 +0200
committerGreg Aker <greg@gregaker.net>2011-08-20 20:58:37 +0200
commit394d8c5bd3e04bd7992793ca7c648f4306a9539d (patch)
treed061b4339f2c3f30428256efae741ab04fd2bf6e /system/libraries/Cart.php
parent43194ea1af658914a89ca49aed4dca4617b9c4ff (diff)
parentd56be70257696d0bbf2dcc880888d8dc17cba21c (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r--system/libraries/Cart.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index b2eaa9ad7..ab5a70c98 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -99,7 +99,7 @@ class CI_Cart {
$save_cart = FALSE;
if (isset($items['id']))
{
- if ($this->_insert($items) == TRUE)
+ if (($rowid = $this->_insert($items)))
{
$save_cart = TRUE;
}
@@ -110,7 +110,7 @@ class CI_Cart {
{
if (is_array($val) AND isset($val['id']))
{
- if ($this->_insert($val) == TRUE)
+ if ($this->_insert($val))
{
$save_cart = TRUE;
}
@@ -122,7 +122,7 @@ class CI_Cart {
if ($save_cart == TRUE)
{
$this->_save_cart();
- return TRUE;
+ return isset($rowid) ? $rowid : TRUE;
}
return FALSE;
@@ -244,7 +244,7 @@ class CI_Cart {
}
// Woot!
- return TRUE;
+ return $rowid;
}
// --------------------------------------------------------------------