summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cart.php1
-rw-r--r--system/libraries/Email.php6
-rw-r--r--system/libraries/Session/drivers/Session_cookie.php2
-rw-r--r--system/libraries/Zip.php11
4 files changed, 18 insertions, 2 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 14f08a8c3..72ef5e8b5 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -45,6 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @category Shopping Cart
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/cart.html
+ * @deprecated 3.0.0 This class is too specific for CI.
*/
class CI_Cart {
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a55d2ffea..5cb16896f 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1630,6 +1630,12 @@ class CI_Email {
*/
public function send($auto_clear = TRUE)
{
+ if ( ! isset($this->_headers['From']))
+ {
+ $this->_set_error_message('lang:email_no_from');
+ return FALSE;
+ }
+
if ($this->_replyto_flag === FALSE)
{
$this->reply_to($this->_headers['From']);
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php
index 0001dc2d8..21ded899a 100644
--- a/system/libraries/Session/drivers/Session_cookie.php
+++ b/system/libraries/Session/drivers/Session_cookie.php
@@ -486,7 +486,7 @@ class CI_Session_cookie extends CI_Session_driver {
$db_cache = $this->CI->db->cache_on;
$this->CI->db->cache_off();
- $query = $this->CI->db->limit(1)->get($this->sess_table_name);
+ $query = $this->CI->db->get($this->sess_table_name);
// Was caching in effect?
if ($db_cache)
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 434229471..2f6ab8b68 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -97,6 +97,15 @@ class CI_Zip {
public $now;
/**
+ * The level of compression
+ *
+ * Ranges from 0 to 9, with 9 being the highest level.
+ *
+ * @var int
+ */
+ public $compression_level = 2;
+
+ /**
* Initialize zip compression class
*
* @return void
@@ -248,7 +257,7 @@ class CI_Zip {
$uncompressed_size = strlen($data);
$crc32 = crc32($data);
- $gzdata = substr(gzcompress($data), 2, -4);
+ $gzdata = substr(gzcompress($data, $this->compression_level), 2, -4);
$compressed_size = strlen($gzdata);
$this->zipdata .=