Merge pull request #825 from owncloud/oc_namespace

Autoload classes with 'OC' namespace prefix.
This commit is contained in:
Thomas Müller 2012-12-11 10:31:42 -08:00
commit 2361639a0d
1 changed files with 3 additions and 0 deletions

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