summaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-08 21:39:09 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-08 21:39:09 +0100
commit25381ac5b145390102e359462f9f99cc7e7802e0 (patch)
treeaaa67741a3f8d48defc606bab66d24e774dae3d0 /lib/filecache.php
parent398fbe7b82c556df29636bf62291b165e4fd3b4f (diff)
downloadnextcloud-server-25381ac5b145390102e359462f9f99cc7e7802e0.tar.gz
nextcloud-server-25381ac5b145390102e359462f9f99cc7e7802e0.zip
fix filecache with MDB2
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index a46f915e553..cb516223f63 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -303,8 +303,8 @@ class OC_FileCache{
if(self::inCache($path,$root)){
$parent=self::getFileId($fullPath);
$query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE parent=?');
- $query->execute(array($parent));
- while($row=$query->fetchRow()){
+ $result=$query->execute(array($parent));
+ while($row=$result->fetchRow()){
$size+=$row['size'];
}
$mtime=$view->filemtime($path);
@@ -330,8 +330,8 @@ class OC_FileCache{
}
}
$query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE path=?');
- $query->execute(array($path));
- if($row=$query->fetchRow()){
+ $result=$query->execute(array($path));
+ if($row=$result->fetchRow()){
return $row['size'];
}else{//file not in cache
return 0;
@@ -517,8 +517,8 @@ class OC_FileCache{
$isDir=$view->is_dir($path);
$path=$root.$path;
$query=OC_DB::prepare('SELECT mtime FROM *PREFIX*fscache WHERE path=?');
- $query->execute(array($path));
- if($row=$query->fetchRow()){
+ $result=$query->execute(array($path));
+ if($row=$result->fetchRow()){
$cachedMTime=$row['mtime'];
return ($mtime>$cachedMTime);
}else{//file not in cache, so it has to be updated