summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-09 18:26:38 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-10 21:06:15 +0200
commit2c3674ea87c6303f8dc1345d056871ca3637b437 (patch)
treec1b7a3a697135052697e38c7a7811376dcb1c239
parentd4feb77eaf204ae37f60067e7f083b44338cba89 (diff)
downloadnextcloud-server-2c3674ea87c6303f8dc1345d056871ca3637b437.tar.gz
nextcloud-server-2c3674ea87c6303f8dc1345d056871ca3637b437.zip
Add logging when stripping apps from autoload include path
-rw-r--r--lib/base.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 50f113543c4..6305da16930 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -72,11 +72,14 @@ class OC{
*/
public static function autoload($className) {
if(array_key_exists($className, OC::$CLASSPATH)) {
+ $path = OC::$CLASSPATH[$className];
/** @TODO: Remove this when necessary
Remove "apps/" from inclusion path for smooth migration to mutli app dir
*/
- $path = str_replace('apps/', '', OC::$CLASSPATH[$className]);
- require_once $path;
+ if (strpos($path, 'apps/')===0) {
+ OC_Log::write('core', 'include path for class "'.$className.'" starts with "apps/"', OC_Log::DEBUG);
+ $path = str_replace('apps/', '', $path);
+ }
}
elseif(strpos($className, 'OC_')===0) {
$path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php');