Autoload classes with 'OC' namespace prefix.

This commit is contained in:
Thomas Tanghus 2012-12-11 16:00:48 +01:00
parent eb7dbf3701
commit af12b0f5da

View file

@ -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');
}