aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2014-11-14 14:44:34 -0500
committerClark Tomlinson <fallen013@gmail.com>2014-11-14 14:44:34 -0500
commitf6d9310d91a0b3f03f12e6fd4f956a06a0be25ce (patch)
tree4176eb03371d9a7f337afe722002d9a7a82cef7b /core
parent0f3c5d8541dcb41eebd00f22864a0a646c11124f (diff)
parentfad621140b3fd94c12ddd3b13b37d4c56c5276ff (diff)
downloadnextcloud-server-f6d9310d91a0b3f03f12e6fd4f956a06a0be25ce.tar.gz
nextcloud-server-f6d9310d91a0b3f03f12e6fd4f956a06a0be25ce.zip
Merge pull request #11029 from owncloud/fix-share-download
Fix share download
Diffstat (limited to 'core')
-rw-r--r--core/routes.php19
-rw-r--r--core/share/controller.php23
2 files changed, 16 insertions, 26 deletions
diff --git a/core/routes.php b/core/routes.php
index 92545d0322e..ced70898f50 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -95,9 +95,22 @@ $this->create('core_avatar_post_cropped', '/avatar/cropped')
->action('OC\Core\Avatar\Controller', 'postCroppedAvatar');
// Sharing routes
-$this->create('core_share_show_share', '/s/{token}')
- ->get()
- ->action('OC\Core\Share\Controller', 'showShare');
+$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
+ $app = new \OCA\Files_Sharing\Application($urlParams);
+ $app->dispatch('ShareController', 'showShare');
+});
+$this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
+ $app = new \OCA\Files_Sharing\Application($urlParams);
+ $app->dispatch('ShareController', 'authenticate');
+});
+$this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
+ $app = new \OCA\Files_Sharing\Application($urlParams);
+ $app->dispatch('ShareController', 'showAuthenticate');
+});
+$this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
+ $app = new \OCA\Files_Sharing\Application($urlParams);
+ $app->dispatch('ShareController', 'downloadShare');
+});
// used for heartbeat
$this->create('heartbeat', '/heartbeat')->action(function(){
diff --git a/core/share/controller.php b/core/share/controller.php
deleted file mode 100644
index c1741af0d98..00000000000
--- a/core/share/controller.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Christopher Schäpers <christopher@schaepers.it>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-namespace OC\Core\Share;
-
-class Controller {
- public static function showShare($args) {
- \OC_Util::checkAppEnabled('files_sharing');
-
- $token = $args['token'];
-
- \OC_App::loadApp('files_sharing');
- \OC_User::setIncognitoMode(true);
-
- require_once \OC_App::getAppPath('files_sharing') .'/public.php';
- }
-}
-?>