summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-10-13 15:52:48 +0200
committerVincent Petry <pvince81@owncloud.com>2014-10-13 15:52:48 +0200
commitd485c0098d58454b8dbd25e574a363a500244942 (patch)
treeb06e7c7f910de041cb12f8b6f2b37702d7d92166 /lib/private/files
parent4b9465b937a7754d2b58a77cf8f12adeaccef993 (diff)
downloadnextcloud-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.
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/cache/storage.php2
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));