[Pkg-owncloud-commits] [owncloud] 09/223: update autoloader

David Prévot taffit at moszumanska.debian.org
Sun Jun 22 01:53:58 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 2c00ab13cf1dca45035e88ecad854997f78cf51c
Author: Georg Ehrke <developer at georgehrke.com>
Date:   Wed Jun 4 11:34:09 2014 +0200

    update autoloader
---
 lib/autoloader.php | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/autoloader.php b/lib/autoloader.php
index 2ce3638..da20a2a 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -89,12 +89,11 @@ class Autoloader {
 		} elseif (strpos($class, 'OCA\\') === 0) {
 			list(, $app, $rest) = explode('\\', $class, 3);
 			$app = strtolower($app);
-			foreach (\OC::$APPSROOTS as $appDir) {
-				if (stream_resolve_include_path($appDir['path'] . '/' . $app)) {
-					$paths[] = $appDir['path'] . '/' . $app . '/' . strtolower(str_replace('\\', '/', $rest) . '.php');
-					// If not found in the root of the app directory, insert '/lib' after app id and try again.
-					$paths[] = $appDir['path'] . '/' . $app . '/lib/' . strtolower(str_replace('\\', '/', $rest) . '.php');
-				}
+			$appPath = \OC_App::getAppPath($app);
+			if (stream_resolve_include_path($appPath)) {
+				$paths[] = $appPath . '/' . strtolower(str_replace('\\', '/', $rest) . '.php');
+				// If not found in the root of the app directory, insert '/lib' after app id and try again.
+				$paths[] = $appPath . '/lib/' . strtolower(str_replace('\\', '/', $rest) . '.php');
 			}
 		} elseif (strpos($class, 'Test_') === 0) {
 			$paths[] = 'tests/lib/' . strtolower(str_replace('_', '/', substr($class, 5)) . '.php');

-- 
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