diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 15:52:48 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 15:52:48 +0200 |
commit | d485c0098d58454b8dbd25e574a363a500244942 (patch) | |
tree | b06e7c7f910de041cb12f8b6f2b37702d7d92166 | |
parent | 4b9465b937a7754d2b58a77cf8f12adeaccef993 (diff) | |
download | nextcloud-server-d485c0098d58454b8dbd25e574a363a500244942.tar.gz nextcloud-server-d485c0098d58454b8dbd25e574a363a500244942.zip |
Retrieve storage numeric id earlier when still available
The numeric id is only available before the storage entry is deleted, so
get it at that time.
-rw-r--r-- | lib/private/files/cache/storage.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index a38656d8499..d7d57811a7d 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -105,10 +105,10 @@ class Storage { */ public static function remove($storageId) { $storageId = self::adjustStorageId($storageId); + $numericId = self::getNumericStorageId($storageId); $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; \OC_DB::executeAudited($sql, array($storageId)); - $numericId = self::getNumericStorageId($storageId); if (!is_null($numericId)) { $sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?'; \OC_DB::executeAudited($sql, array($numericId)); |