diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2013-11-26 03:01:40 -0800 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2013-11-26 03:01:40 -0800 |
commit | a4e4839d9f09d27b6f0cba92fad0231632b3a04d (patch) | |
tree | 2a2f353f2f7b0fd6cde035068a2036ab630f688b /framework/Caching | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 65adcbec2cc9a00a5b0611e34c7141bf4e6d63f7 (diff) |
Merge pull request #491 from pradosoft/jquery
Main development switch to Jquery
Diffstat (limited to 'framework/Caching')
-rw-r--r-- | framework/Caching/TDbCache.php | 6 | ||||
-rw-r--r-- | framework/Caching/TSqliteCache.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php index 01962a55..03c6f54f 100644 --- a/framework/Caching/TDbCache.php +++ b/framework/Caching/TDbCache.php @@ -463,12 +463,12 @@ class TDbCache extends TCache try { $sql='SELECT value FROM '.$this->_cacheTable.' WHERE itemkey=\''.$key.'\' AND (expire=0 OR expire>'.time().') ORDER BY expire DESC'; $command=$this->getDbConnection()->createCommand($sql); - return Prado::unserialize($command->queryScalar()); + return unserialize($command->queryScalar()); } catch(Exception $e) { $this->initializeCache(true); - return Prado::unserialize($command->queryScalar()); + return unserialize($command->queryScalar()); } } @@ -505,7 +505,7 @@ class TDbCache extends TCache { $command=$this->getDbConnection()->createCommand($sql); $command->bindValue(':key',$key,PDO::PARAM_STR); - $command->bindValue(':value',Prado::serialize($value),PDO::PARAM_LOB); + $command->bindValue(':value',serialize($value),PDO::PARAM_LOB); $command->execute(); return true; } diff --git a/framework/Caching/TSqliteCache.php b/framework/Caching/TSqliteCache.php index a00a8472..ae040028 100644 --- a/framework/Caching/TSqliteCache.php +++ b/framework/Caching/TSqliteCache.php @@ -163,7 +163,7 @@ class TSqliteCache extends TCache { $sql='SELECT value FROM '.self::CACHE_TABLE.' WHERE key=\''.$key.'\' AND (expire=0 OR expire>'.time().') LIMIT 1'; if(($ret=$this->_db->query($sql))!=false && ($row=$ret->fetch(SQLITE_ASSOC))!==false) - return Prado::unserialize($row['value']); + return unserialize($row['value']); else return false; } @@ -180,7 +180,7 @@ class TSqliteCache extends TCache protected function setValue($key,$value,$expire) { $expire=($expire<=0)?0:time()+$expire; - $sql='REPLACE INTO '.self::CACHE_TABLE.' VALUES(\''.$key.'\',\''.sqlite_escape_string(Prado::serialize($value)).'\','.$expire.')'; + $sql='REPLACE INTO '.self::CACHE_TABLE.' VALUES(\''.$key.'\',\''.sqlite_escape_string(serialize($value)).'\','.$expire.')'; return $this->_db->query($sql)!==false; } @@ -196,7 +196,7 @@ class TSqliteCache extends TCache protected function addValue($key,$value,$expire) { $expire=($expire<=0)?0:time()+$expire; - $sql='INSERT INTO '.self::CACHE_TABLE.' VALUES(\''.$key.'\',\''.sqlite_escape_string(Prado::serialize($value)).'\','.$expire.')'; + $sql='INSERT INTO '.self::CACHE_TABLE.' VALUES(\''.$key.'\',\''.sqlite_escape_string(serialize($value)).'\','.$expire.')'; return @$this->_db->query($sql)!==false; } |