aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-09 22:45:34 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-09 22:45:34 +0200
commit98a5f121fddf9b41aa68937d6f8da700a34f9744 (patch)
treee461a114dc43de8ae1487397e9cc1b32d218805f /lib/private/route
parent5b8c7a01e90a03687a209ed5f3bd419b095f4f66 (diff)
downloadnextcloud-server-98a5f121fddf9b41aa68937d6f8da700a34f9744.tar.gz
nextcloud-server-98a5f121fddf9b41aa68937d6f8da700a34f9744.zip
To isolate the variable scope used inside the $file it is required in it's own method
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/router.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 1f0a23ee124..0431855707e 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;
+ }
+
}