summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cart.php
diff options
context:
space:
mode:
authorAlex Bilbie <alex.bilbie@gmail.com>2011-08-20 18:35:22 +0200
committerAlex Bilbie <alex.bilbie@gmail.com>2011-08-20 18:35:22 +0200
commit95311be467faa2e744bbd9e932900a7cf96b081f (patch)
treea6c79c5bd332549e2f6746c4126879983f5b6d45 /system/libraries/Cart.php
parent43194ea1af658914a89ca49aed4dca4617b9c4ff (diff)
Renamed some Session library functions to make them shorter. Includes backwards compatibility.
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r--system/libraries/Cart.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index b2eaa9ad7..1caef49cd 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -59,9 +59,9 @@ class CI_Cart {
$this->CI->load->library('session', $config);
// Grab the shopping cart array from the session table, if it exists
- if ($this->CI->session->userdata('cart_contents') !== FALSE)
+ if ($this->CI->session->get('cart_contents') !== FALSE)
{
- $this->_cart_contents = $this->CI->session->userdata('cart_contents');
+ $this->_cart_contents = $this->CI->session->get('cart_contents');
}
else
{
@@ -397,7 +397,7 @@ class CI_Cart {
// Is our cart empty? If so we delete it from the session
if (count($this->_cart_contents) <= 2)
{
- $this->CI->session->unset_userdata('cart_contents');
+ $this->CI->session->rm('cart_contents');
// Nothing more to do... coffee time!
return FALSE;
@@ -405,7 +405,7 @@ class CI_Cart {
// If we made it this far it means that our cart has data.
// Let's pass it to the Session class so it can be stored
- $this->CI->session->set_userdata(array('cart_contents' => $this->_cart_contents));
+ $this->CI->session->set(array('cart_contents' => $this->_cart_contents));
// Woot!
return TRUE;
@@ -541,7 +541,7 @@ class CI_Cart {
$this->_cart_contents['cart_total'] = 0;
$this->_cart_contents['total_items'] = 0;
- $this->CI->session->unset_userdata('cart_contents');
+ $this->CI->session->rm('cart_contents');
}