Autoload classes with 'OC' namespace prefix.

remotes/origin/stable5
Thomas Tanghus 2012-12-11 16:00:48 +07:00
parent eb7dbf3701
commit af12b0f5da
1 changed files with 3 additions and 0 deletions

@ -90,6 +90,9 @@ class OC{
elseif(strpos($className, 'OC_')===0) {
$path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php');
}
elseif(strpos($className, 'OC\\')===0) {
$path = strtolower(str_replace('\\', '/', substr($className, 3)) . '.php');
}
elseif(strpos($className, 'OCP\\')===0) {
$path = 'public/'.strtolower(str_replace('\\', '/', substr($className, 3)) . '.php');
}