Skip to content
Snippets Groups Projects
Commit b5953e7a authored by Brice Maron's avatar Brice Maron
Browse files

Provide solution for smoother migration for apps to multi-app dir

parent fcaf04ca
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,11 @@ class OC{ ...@@ -71,7 +71,11 @@ class OC{
*/ */
public static function autoload($className){ public static function autoload($className){
if(array_key_exists($className,OC::$CLASSPATH)){ 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){ elseif(strpos($className,'OC_')===0){
require_once strtolower(str_replace('_','/',substr($className,3)) . '.php'); require_once strtolower(str_replace('_','/',substr($className,3)) . '.php');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment