Merge pull request #11546 from owncloud/users-deletewithfilecache

Retrieve storage numeric id earlier when still available
This commit is contained in:
Vincent Petry 2014-10-13 17:27:13 +02:00
commit e95372bf01
1 changed files with 1 additions and 1 deletions

View File

@ -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));