[Pkg-owncloud-commits] [owncloud] 108/134: To isolate the variable scope used inside the $file it is required in it's own method - refs #8138
David Prévot
taffit at moszumanska.debian.org
Fri Apr 18 21:44:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 2741eb1fe3f7bdd53c44a6c43e3f5dc9db18a04e
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Thu Apr 10 16:15:04 2014 +0200
To isolate the variable scope used inside the $file it is required in it's own method - refs #8138
---
lib/private/router.php | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/private/router.php b/lib/private/router.php
index dbaca9e..febd140 100644
--- a/lib/private/router.php
+++ b/lib/private/router.php
@@ -65,7 +65,7 @@ class OC_Router {
public function loadRoutes() {
foreach($this->getRoutingFiles() as $app => $file) {
$this->useCollection($app);
- require_once $file;
+ $this->requireRouteFile($file);
$collection = $this->getCollection($app);
$this->root->addCollection($collection, '/apps/'.$app);
}
@@ -180,4 +180,11 @@ class OC_Router {
}
OCP\JSON::success ( array( 'data' => $routes ) );
}
+
+ /**
+ * 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;
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list