diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-04 10:28:06 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-06 16:46:59 +0200 |
commit | 093e9dd4225e6681140523c75bfc20809cd6d651 (patch) | |
tree | 21541ba147dad52fefc704900b6aebe4b8d921b0 /apps/files/appinfo | |
parent | ba998670333b5430cd00dbce82a44f831ef34da1 (diff) | |
download | nextcloud-server-093e9dd4225e6681140523c75bfc20809cd6d651.tar.gz nextcloud-server-093e9dd4225e6681140523c75bfc20809cd6d651.zip |
Add route to resolve fileid to files app URL
The following routes will redirect to the files app and display the
matching folder. If the fileid is a file, it will scroll to it.
- http://localhost/owncloud/index.php/f/$fileid
- http://localhost/owncloud/index.php/files/?dir=somedir&fileid=$fileid
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r-- | apps/files/appinfo/application.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files/appinfo/application.php b/apps/files/appinfo/application.php index 2d2decf6288..3dd73037871 100644 --- a/apps/files/appinfo/application.php +++ b/apps/files/appinfo/application.php @@ -26,6 +26,7 @@ use OCA\Files\Controller\ApiController; use OCP\AppFramework\App; use \OCA\Files\Service\TagService; use \OCP\IContainer; +use OCA\Files\Controller\ViewController; class Application extends App { public function __construct(array $urlParams=array()) { @@ -48,6 +49,20 @@ class Application extends App { ); }); + $container->registerService('ViewController', function (IContainer $c) use ($server) { + return new ViewController( + $c->query('AppName'), + $c->query('Request'), + $server->getURLGenerator(), + $server->getNavigationManager(), + $c->query('L10N'), + $server->getConfig(), + $server->getEventDispatcher(), + $server->getUserSession(), + $server->getUserFolder() + ); + }); + /** * Core */ |