mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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.
This commit is contained in:
parent
4b9465b937
commit
d485c0098d
1 changed files with 1 additions and 1 deletions
2
lib/private/files/cache/storage.php
vendored
2
lib/private/files/cache/storage.php
vendored
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue