]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add logging when stripping apps from autoload include path
authorBart Visscher <bartv@thisnet.nl>
Tue, 9 Oct 2012 16:26:38 +0000 (18:26 +0200)
committerBart Visscher <bartv@thisnet.nl>
Wed, 10 Oct 2012 19:06:15 +0000 (21:06 +0200)
lib/base.php

index 50f113543c4a5f5953721f285982685c57014add..6305da169306a6f1cb7bfcac28ce3b4f6e37a9ae 100644 (file)
@@ -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');