]> source.dussan.org Git - nextcloud-server.git/commitdiff
Provide solution for smoother migration for apps to multi-app dir
authorBrice Maron <brice@bmaron.net>
Thu, 21 Jun 2012 22:22:36 +0000 (22:22 +0000)
committerBrice Maron <brice@bmaron.net>
Thu, 21 Jun 2012 22:22:36 +0000 (22:22 +0000)
lib/base.php

index 2f16f7dab4c95a4b0f277c1e329c99c18086ab3f..22dd86535a02a54150a6695aa210c9d08181cf6b 100644 (file)
@@ -71,7 +71,11 @@ class OC{
         */
        public static function autoload($className){
                if(array_key_exists($className,OC::$CLASSPATH)){
-                       require_once OC::$CLASSPATH[$className];
+                       /** @TODO: Remove this when necessary
+                        Remove "apps/" from inclusion path for smooth migration to mutli app dir
+                       */
+                       $path = preg_replace('/apps\//','', OC::$CLASSPATH[$className]);
+                       require_once $path;
                }
                elseif(strpos($className,'OC_')===0){
                        require_once strtolower(str_replace('_','/',substr($className,3)) . '.php');