[files_external] Remove unneeded update steps
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
6bd1c50dc3
commit
83864d465e
3 changed files with 0 additions and 88 deletions
|
@ -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();
|
|
||||||
}
|
|
|
@ -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
|
* Migrate personal storages configured by the current user
|
||||||
*
|
*
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue