diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-08 21:25:20 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-08 21:26:45 +0100 |
commit | 398fbe7b82c556df29636bf62291b165e4fd3b4f (patch) | |
tree | 9d4e9aae6c7072f16b20285a37f130a891af4d98 | |
parent | 88b2391d2bfbc85f9c976e6aacd302481e9898ee (diff) | |
download | nextcloud-server-398fbe7b82c556df29636bf62291b165e4fd3b4f.tar.gz nextcloud-server-398fbe7b82c556df29636bf62291b165e4fd3b4f.zip |
use fetchRow instead of fetch
-rw-r--r-- | lib/filecache.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index a053e4cbc1b..a46f915e553 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -304,7 +304,7 @@ class OC_FileCache{ $parent=self::getFileId($fullPath); $query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE parent=?'); $query->execute(array($parent)); - while($row=$query->fetch()){ + while($row=$query->fetchRow()){ $size+=$row['size']; } $mtime=$view->filemtime($path); @@ -331,7 +331,7 @@ class OC_FileCache{ } $query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE path=?'); $query->execute(array($path)); - if($row=$query->fetch()){ + if($row=$query->fetchRow()){ return $row['size']; }else{//file not in cache return 0; @@ -518,7 +518,7 @@ class OC_FileCache{ $path=$root.$path; $query=OC_DB::prepare('SELECT mtime FROM *PREFIX*fscache WHERE path=?'); $query->execute(array($path)); - if($row=$query->fetch()){ + if($row=$query->fetchRow()){ $cachedMTime=$row['mtime']; return ($mtime>$cachedMTime); }else{//file not in cache, so it has to be updated @@ -557,7 +557,7 @@ class OC_FileCache{ $parent=self::getFileId($view->getRoot().$path); $query=OC_DB::prepare('SELECT name FROM *PREFIX*fscache WHERE parent=?'); $result=$query->execute(array($parent)); - while($row=$result->fetch()){ + while($row=$result->fetchRow()){ $file=$path.'/'.$row['name']; if(!$view->file_exists($file)){ if(!$root){//filesystem hooks are only valid for the default root |