From b5953e7a83d2dc8f1483c7809414dca7a1cde990 Mon Sep 17 00:00:00 2001
From: Brice Maron <brice@bmaron.net>
Date: Thu, 21 Jun 2012 22:22:36 +0000
Subject: [PATCH] Provide solution for smoother migration for apps to multi-app
 dir

---
 lib/base.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/base.php b/lib/base.php
index 2f16f7dab4..22dd86535a 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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');
-- 
GitLab