From: Vincent Petry Date: Mon, 13 Oct 2014 13:52:48 +0000 (+0200) Subject: Retrieve storage numeric id earlier when still available X-Git-Tag: v8.0.0alpha1~522^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d485c0098d58454b8dbd25e574a363a500244942;p=nextcloud-server.git 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. --- 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));