summaryrefslogtreecommitdiffstats
path: root/lib/private/Route/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Route/Router.php')
-rw-r--r--lib/private/Route/Router.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index 01262be390c..f7da827c3db 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -150,6 +150,11 @@ class Router implements IRouter {
$collection = $this->getCollection($app);
$collection->addPrefix('/apps/' . $app);
$this->root->addCollection($collection);
+
+ // Also add the OCS collection
+ $collection = $this->getCollection($app.'.ocs');
+ $collection->addPrefix('/ocsapp/apps/' . $app);
+ $this->root->addCollection($collection);
}
}
if (!isset($this->loadedApps['core'])) {
@@ -241,6 +246,13 @@ class Router implements IRouter {
$app = \OC_App::cleanAppId($app);
\OC::$REQUESTEDAPP = $app;
$this->loadRoutes($app);
+ } else if (substr($url, 0, 13) === '/ocsapp/apps/') {
+ // empty string / 'ocsapp' / 'apps' / $app / rest of the route
+ list(, , , $app,) = explode('/', $url, 5);
+
+ $app = \OC_App::cleanAppId($app);
+ \OC::$REQUESTEDAPP = $app;
+ $this->loadRoutes($app);
} else if (substr($url, 0, 6) === '/core/' or substr($url, 0, 10) === '/settings/') {
\OC::$REQUESTEDAPP = $url;
if (!\OC::$server->getConfig()->getSystemValue('maintenance', false) && !Util::needUpgrade()) {