Update to CodeIgniter 2.1.0

This commit is contained in:
Karsten Heiken
2011-12-04 14:24:27 +01:00
parent fde35df5bd
commit 79c236dc49
149 changed files with 4384 additions and 590 deletions

4
system/libraries/Cache/drivers/Cache_apc.php Executable file → Normal file
View File

@@ -132,7 +132,7 @@ class CI_Cache_apc extends CI_Driver {
*/
public function is_supported()
{
if ( ! extension_loaded('apc') OR ! function_exists('apc_store'))
if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1")
{
log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
return FALSE;
@@ -148,4 +148,4 @@ class CI_Cache_apc extends CI_Driver {
// End Class
/* End of file Cache_apc.php */
/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */

0
system/libraries/Cache/drivers/Cache_dummy.php Executable file → Normal file
View File

0
system/libraries/Cache/drivers/Cache_file.php Executable file → Normal file
View File

11
system/libraries/Cache/drivers/Cache_memcached.php Executable file → Normal file
View File

@@ -64,7 +64,16 @@ class CI_Cache_memcached extends CI_Driver {
*/
public function save($id, $data, $ttl = 60)
{
return $this->_memcached->add($id, array($data, time(), $ttl), $ttl);
if (get_class($this->_memcached) == 'Memcached')
{
return $this->_memcached->set($id, array($data, time(), $ttl), $ttl);
}
else if (get_class($this->_memcached) == 'Memcache')
{
return $this->_memcached->set($id, array($data, time(), $ttl), 0, $ttl);
}
return FALSE;
}
// ------------------------------------------------------------------------