]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Close cursor early in calculateFolderSize"
authorJoas Schilling <nickvergessen@gmx.de>
Fri, 30 Jan 2015 14:35:54 +0000 (15:35 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Fri, 30 Jan 2015 14:35:54 +0000 (15:35 +0100)
This reverts commit 234f33e01e630f763f34c51114d25986bae02b42.

lib/private/files/cache/cache.php
lib/private/files/cache/homecache.php

index 8322b0f6b9c78f036b6c7dcfc9c7d289f9f435ac..7ea00325a1015d34bb51e9877d2422e66b69f76c 100644 (file)
@@ -540,7 +540,6 @@ class Cache {
                                'WHERE `parent` = ? AND `storage` = ?';
                        $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
                        if ($row = $result->fetchRow()) {
-                               $result->closeCursor();
                                list($sum, $min, $unencryptedSum) = array_values($row);
                                $sum = 0 + $sum;
                                $min = 0 + $min;
@@ -563,8 +562,6 @@ class Cache {
                                if ($totalSize !== -1 and $unencryptedSum > 0) {
                                        $totalSize = $unencryptedSum;
                                }
-                       } else {
-                               $result->closeCursor();
                        }
                }
                return $totalSize;
index ad7f587b8b6d72d857ca9462562a6af31be57fe3..2b3967c8807dfa8bbbfaf4d8ad9b6ed2ed9d8135 100644 (file)
@@ -35,7 +35,6 @@ class HomeCache extends Cache {
                                'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
                        $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
                        if ($row = $result->fetchRow()) {
-                               $result->closeCursor();
                                list($sum, $unencryptedSum) = array_values($row);
                                $totalSize = 0 + $sum;
                                $unencryptedSize = 0 + $unencryptedSum;