diff options
author | Greg Aker <greg@gregaker.net> | 2011-08-21 22:47:30 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-08-21 22:47:30 +0200 |
commit | b47af4423cea88ff3fef199e1871d7b9c0f3b0d3 (patch) | |
tree | d0e78dcf232fa4c11f56e720cf7021d8285a37d1 | |
parent | f45ea72f1105f3e30002d60c2cf8db8c11b9a9f1 (diff) | |
parent | 284dd9756b8c03059d13e460190d2385ba599a91 (diff) |
Merge branch 'develop' into feature/unit-tests
-rw-r--r-- | system/libraries/Cache/drivers/Cache_memcached.php | 2 | ||||
-rw-r--r-- | system/libraries/Email.php | 6 | ||||
-rw-r--r-- | user_guide/changelog.html | 3 | ||||
-rw-r--r-- | user_guide/database/active_record.html | 7 |
4 files changed, 14 insertions, 4 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index ae9d6cd96..04aa81a5a 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -64,7 +64,7 @@ class CI_Cache_memcached extends CI_Driver { */ public function save($id, $data, $ttl = 60) { - return $this->_memcached->add($id, array($data, time(), $ttl), $ttl); + return $this->_memcached->set($id, array($data, time(), $ttl), $ttl); } // ------------------------------------------------------------------------ diff --git a/system/libraries/Email.php b/system/libraries/Email.php index e28c23a04..28a3d17b4 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -452,7 +452,7 @@ class CI_Email { */ public function set_alt_message($str = '') { - $this->alt_message = $str; + $this->alt_message = (string) $str; return $this; } @@ -477,12 +477,12 @@ class CI_Email { * Set Wordwrap * * @access public - * @param string + * @param bool * @return void */ public function set_wordwrap($wordwrap = TRUE) { - $this->wordwrap = ($wordwrap === FALSE) ? FALSE : TRUE; + $this->wordwrap = (bool) $wordwrap; return $this; } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 15872c1ac..bb05f99e1 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -78,6 +78,9 @@ Change Log <ul> <li class="reactor">Added a <a href="http://www.cubrid.org/" target="_blank">CUBRID</a> driver to the <a href="libraries/database.html">Database Driver</a>. Thanks to the CUBRID team for supplying this patch.</li> <li class="reactor">Typecast limit and offset in the <a href="database/queries.html">Database Driver</a> to integers to avoid possible injection.</li> + <li class="reactor"> + Added additional option 'none' for the optional third argument for <kbd>$this->db->like()</kbd> in the <a href="database/active_record.html">Database Driver</a>. + </li> </ul> </li> <li>Libraries diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 6609d287e..92d9614d5 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -334,6 +334,13 @@ $this->db->or_where('id >', $id); $this->db->like('title', 'match', 'both'); <br /> // Produces: WHERE title LIKE '%match%' </code> </li> +If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'. + +<code> + $this->db->like('title', 'match', 'none'); <br /> +// Produces: WHERE title LIKE 'match' +</code> + <li><strong>Associative array method:</strong> <code> |