Merge pull request #11546 from owncloud/users-deletewithfilecache
Retrieve storage numeric id earlier when still available
This commit is contained in:
commit
e95372bf01
|
@ -105,10 +105,10 @@ class Storage {
|
||||||
*/
|
*/
|
||||||
public static function remove($storageId) {
|
public static function remove($storageId) {
|
||||||
$storageId = self::adjustStorageId($storageId);
|
$storageId = self::adjustStorageId($storageId);
|
||||||
|
$numericId = self::getNumericStorageId($storageId);
|
||||||
$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';
|
$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';
|
||||||
\OC_DB::executeAudited($sql, array($storageId));
|
\OC_DB::executeAudited($sql, array($storageId));
|
||||||
|
|
||||||
$numericId = self::getNumericStorageId($storageId);
|
|
||||||
if (!is_null($numericId)) {
|
if (!is_null($numericId)) {
|
||||||
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';
|
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';
|
||||||
\OC_DB::executeAudited($sql, array($numericId));
|
\OC_DB::executeAudited($sql, array($numericId));
|
||||||
|
|
Loading…
Reference in New Issue