Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-03-27 17:21:24 +0300
committerGitHub <noreply@github.com>2017-03-27 17:21:24 +0300
commitdc5ba954693ba95b687c517b1bad895f706c8309 (patch)
treee5056d979ca43a8e8604812a4ede27dc7ca6d3fd /core/routes.php
parentfc044caab1813db961281cf0688867640edf7288 (diff)
parent4174d75f8661ca3a26ef8cdfd48a6f955491fdfe (diff)
Merge pull request #4027 from nextcloud/better-spreed-call-urls
Better spreed call urls
Diffstat (limited to 'core/routes.php')
-rw-r--r--core/routes.php42
1 files changed, 34 insertions, 8 deletions
diff --git a/core/routes.php b/core/routes.php
index d3356404fd5..7a2d9d750cc 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -83,22 +83,48 @@ $this->create('files.viewcontroller.showFile', '/f/{fileid}')->action(function($
$app->dispatch('ViewController', 'index');
});
+// Call routes
+$this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(function($urlParams) {
+ if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
+ $app = new \OCA\Spreed\AppInfo\Application($urlParams);
+ $app->dispatch('PageController', 'index');
+ } else {
+ throw new \OC\HintException('App spreed is not enabled');
+ }
+});
+
// Sharing routes
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
- $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
- $app->dispatch('ShareController', 'showShare');
+ if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
+ $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
+ $app->dispatch('ShareController', 'showShare');
+ } else {
+ throw new \OC\HintException('App file sharing is not enabled');
+ }
});
$this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
- $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
- $app->dispatch('ShareController', 'authenticate');
+ if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
+ $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
+ $app->dispatch('ShareController', 'authenticate');
+ } else {
+ throw new \OC\HintException('App file sharing is not enabled');
+ }
});
$this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
- $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
- $app->dispatch('ShareController', 'showAuthenticate');
+ if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
+ $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
+ $app->dispatch('ShareController', 'showAuthenticate');
+ } else {
+ throw new \OC\HintException('App file sharing is not enabled');
+ }
});
$this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
- $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
- $app->dispatch('ShareController', 'downloadShare');
+ if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
+ $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
+ $app->dispatch('ShareController', 'downloadShare');
+ } else {
+ throw new \OC\HintException('App file sharing is not enabled');
+ }
});
// used for heartbeat