diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-01-26 05:20:15 -0800 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-01-26 05:20:15 -0800 |
commit | c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb (patch) | |
tree | 16eefac52b15283f00fee350547d946a7df9c488 | |
parent | 276d98b9ddd18c216956b2c9916583e8098186d0 (diff) | |
parent | 2cc77759aa78e3b2228a827014ba4292c55edcdf (diff) | |
download | nextcloud-server-c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb.tar.gz nextcloud-server-c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb.zip |
Merge pull request #1320 from owncloud/implements-1316-master
lookup for OCA classes in all apps folders
-rw-r--r-- | lib/base.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index f1a60a17739..aff3e1d5a11 100644 --- a/lib/base.php +++ b/lib/base.php @@ -96,7 +96,14 @@ class OC } elseif (strpos($className, 'OCP\\') === 0) { $path = 'public/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); } elseif (strpos($className, 'OCA\\') === 0) { - $path = 'apps/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); + foreach(self::$APPSROOTS as $appDir) { + $path = $appDir['path'] . '/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); + $fullPath = stream_resolve_include_path($path); + if (file_exists($fullPath)) { + require_once $fullPath; + return false; + } + } } elseif (strpos($className, 'Sabre_') === 0) { $path = str_replace('_', '/', $className) . '.php'; } elseif (strpos($className, 'Symfony\\Component\\Routing\\') === 0) { |