summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo/app.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-11-16 20:57:41 +0100
committerLukas Reschke <lukas@owncloud.com>2015-11-16 21:10:11 +0100
commitdaa388ce8d8ea653d3cae2e016cabd266d19d674 (patch)
treea59d35736549945654460e7746f37db0aea185c5 /apps/files/appinfo/app.php
parent5ec64c4fd7f087027ef945c4d694de1d90bbd814 (diff)
downloadnextcloud-server-daa388ce8d8ea653d3cae2e016cabd266d19d674.tar.gz
nextcloud-server-daa388ce8d8ea653d3cae2e016cabd266d19d674.zip
Move index.php from files to AppFramework
1. Allows it to use the more secure CSP rules of the AppFramework. 2. Adds some unit tests.
Diffstat (limited to 'apps/files/appinfo/app.php')
-rw-r--r--apps/files/appinfo/app.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 40b194ab882..c752b5e7d72 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -25,12 +25,14 @@
*/
\OCP\App::registerAdmin('files', 'admin');
+
\OC::$server->getNavigationManager()->add(function () {
+ $urlGenerator = \OC::$server->getURLGenerator();
$l = \OC::$server->getL10N('files');
return [
'id' => 'files_index',
'order' => 0,
- 'href' => \OCP\Util::linkTo('files', 'index.php'),
+ 'href' => $urlGenerator->linkToRoute('files.view.index'),
'icon' => \OCP\Util::imagePath('core', 'places/files.svg'),
'name' => $l->t('Files'),
];