From 25381ac5b145390102e359462f9f99cc7e7802e0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 8 Feb 2012 21:39:09 +0100 Subject: [PATCH] fix filecache with MDB2 --- lib/filecache.php | 12 ++++++------ 1 file 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 -- 2.39.5