From: Michael Gapczynski Date: Fri, 2 Aug 2013 14:02:47 +0000 (-0400) Subject: Use old database methods for caclulateFolderSize X-Git-Tag: v5.0.10~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9fc995498f6df6834d8846060e30f7346b0cf737;p=nextcloud-server.git Use old database methods for caclulateFolderSize --- diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index bc8b07db1a0..76e1ee97727 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -503,9 +503,9 @@ class Cache { $entry = $this->get($path); if ($entry && $entry['mimetype'] === 'httpd/unix-directory') { $id = $entry['fileid']; - $sql = 'SELECT SUM(`size`), MIN(`size`) FROM `*PREFIX*filecache` '. - 'WHERE `parent` = ? AND `storage` = ?'; - $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId())); + $query = \OC_DB::prepare('SELECT SUM(`size`), MIN(`size`) FROM `*PREFIX*filecache` '. + 'WHERE `parent` = ? AND `storage` = ?'); + $result = $query->execute(array($id, $this->getNumericStorageId())); if ($row = $result->fetchRow()) { list($sum, $min) = array_values($row); $sum = (int)$sum;