[files_external] Remove unneeded update steps

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-04-12 00:45:19 -05:00
parent 6bd1c50dc3
commit 83864d465e
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
3 changed files with 0 additions and 88 deletions

View File

@ -1,32 +0,0 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
$installedVersion = \OC::$server->getConfig()->getAppValue('files_external', 'installed_version');
$app = new \OCA\Files_External\AppInfo\Application();
// Migration to db config
if (version_compare($installedVersion, '0.5.0', '<')) {
$migrator = $app->getContainer()->query('OCA\Files_External\Migration\StorageMigrator');
$migrator->migrateGlobal();
}

View File

@ -117,16 +117,6 @@ class StorageMigrator {
}
}
/**
* Migrate admin configured storages
*/
public function migrateGlobal() {
$legacyService = new GlobalLegacyStoragesService($this->backendService);
$storageService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->userMountCache);
$this->migrate($legacyService, $storageService);
}
/**
* Migrate personal storages configured by the current user
*

View File

@ -1,46 +0,0 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCA\Files_External\Service;
/**
* Read admin defined mounts from the legacy mount.json
*/
class GlobalLegacyStoragesService extends LegacyStoragesService {
/**
* @param BackendService $backendService
*/
public function __construct(BackendService $backendService) {
$this->backendService = $backendService;
}
/**
* Read legacy config data
*
* @return array list of mount configs
*/
protected function readLegacyConfig() {
// read global config
return \OC_Mount_Config::readData();
}
}