diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-10 16:09:23 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-10 16:09:23 +0200 |
commit | ecd74d363041cd447e44d31a72b36ae55c11902f (patch) | |
tree | a50b1582a65496fce82e2ac93d81f4404deffe3c /lib | |
parent | 654d5af39434f9555e05b75b2af6fc99d798459d (diff) | |
parent | 98a5f121fddf9b41aa68937d6f8da700a34f9744 (diff) | |
download | nextcloud-server-ecd74d363041cd447e44d31a72b36ae55c11902f.tar.gz nextcloud-server-ecd74d363041cd447e44d31a72b36ae55c11902f.zip |
Merge pull request #8138 from owncloud/allow-app-in-routes.php
To isolate the variable scope used inside the $file it is required in it...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/route/router.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php index 6ad016b2a31..fa0ad6ab95b 100644 --- a/lib/private/route/router.php +++ b/lib/private/route/router.php @@ -117,7 +117,7 @@ class Router implements IRouter { if (!isset($this->loadedApps[$app])) { $this->loadedApps[$app] = true; $this->useCollection($app); - require_once $file; + $this->requireRouteFile($file); $collection = $this->getCollection($app); $collection->addPrefix('/apps/' . $app); $this->root->addCollection($collection); @@ -230,4 +230,12 @@ class Router implements IRouter { return $this->getGenerator()->generate($name, $parameters, $absolute); } + /** + * To isolate the variable scope used inside the $file it is required in it's own method + * @param $file + */ + private function requireRouteFile($file) { + require_once $file; + } + } |