diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-26 15:07:39 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-16 13:55:19 +0200 |
commit | 1052feabede4b9054047f60aaa6fe4e04e89c434 (patch) | |
tree | 7f87fd18601f2f0648f85c5f066dcc0647c05910 /apps/files_external/appinfo | |
parent | 7917f4cf763a3f35f81f500b5f5b5135cd136518 (diff) | |
download | nextcloud-server-1052feabede4b9054047f60aaa6fe4e04e89c434.tar.gz nextcloud-server-1052feabede4b9054047f60aaa6fe4e04e89c434.zip |
remove depricated methods from MountConfig
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/appinfo')
-rw-r--r-- | apps/files_external/appinfo/app.php | 6 | ||||
-rw-r--r-- | apps/files_external/appinfo/routes.php | 59 |
2 files changed, 32 insertions, 33 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php index 432a2af502d..92236f2de32 100644 --- a/apps/files_external/appinfo/app.php +++ b/apps/files_external/appinfo/app.php @@ -31,10 +31,10 @@ use OCA\Files_External\Config\ConfigAdapter; require_once __DIR__ . '/../3rdparty/autoload.php'; // register Application object singleton -\OCA\Files_External\MountConfig::$app = \OC::$server->query(\OCA\Files_External\AppInfo\Application::class); -\OCA\Files_External\MountConfig::$app->registerListeners(); +$app = \OC::$server->query(\OCA\Files_External\AppInfo\Application::class); +$app->registerListeners(); -$appContainer = \OCA\Files_External\MountConfig::$app->getContainer(); +$appContainer = $app->getContainer(); \OCA\Files\App::getNavigationManager()->add(function () { $l = \OC::$server->getL10N('files_external'); diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index bce4b0acdfb..df0a9922dd7 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -26,36 +26,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -\OCA\Files_External\MountConfig::$app->registerRoutes( - $this, - [ - 'resources' => [ - 'global_storages' => ['url' => '/globalstorages'], - 'user_storages' => ['url' => '/userstorages'], - 'user_global_storages' => ['url' => '/userglobalstorages'], - ], - 'routes' => [ - [ - 'name' => 'Ajax#getSshKeys', - 'url' => '/ajax/public_key.php', - 'verb' => 'POST', - 'requirements' => [], - ], - [ - 'name' => 'Ajax#saveGlobalCredentials', - 'url' => '/globalcredentials', - 'verb' => 'POST', - ], - ], - 'ocs' => [ - [ - 'name' => 'Api#getUserMounts', - 'url' => '/api/v1/mounts', - 'verb' => 'GET', - ], - ], - ] -); + $this->create('files_external_oauth1', 'apps/files_external/ajax/oauth1.php') ->actionInclude('files_external/ajax/oauth1.php'); @@ -65,3 +36,31 @@ $this->create('files_external_oauth2', 'apps/files_external/ajax/oauth2.php') $this->create('files_external_list_applicable', '/apps/files_external/applicable') ->actionInclude('files_external/ajax/applicable.php'); + +return [ + 'resources' => [ + 'global_storages' => ['url' => '/globalstorages'], + 'user_storages' => ['url' => '/userstorages'], + 'user_global_storages' => ['url' => '/userglobalstorages'], + ], + 'routes' => [ + [ + 'name' => 'Ajax#getSshKeys', + 'url' => '/ajax/public_key.php', + 'verb' => 'POST', + 'requirements' => [], + ], + [ + 'name' => 'Ajax#saveGlobalCredentials', + 'url' => '/globalcredentials', + 'verb' => 'POST', + ], + ], + 'ocs' => [ + [ + 'name' => 'Api#getUserMounts', + 'url' => '/api/v1/mounts', + 'verb' => 'GET', + ], + ], +]; |