]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use old database methods for caclulateFolderSize
authorMichael Gapczynski <mtgap@owncloud.com>
Fri, 2 Aug 2013 14:02:47 +0000 (10:02 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Fri, 2 Aug 2013 14:02:47 +0000 (10:02 -0400)
lib/files/cache/cache.php

index bc8b07db1a055ba38dbdc003d17d3355fe25877a..76e1ee977274643157235717701c4f052d1f214b 100644 (file)
@@ -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;