summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-12-11 10:31:42 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2012-12-11 10:31:42 -0800
commit2361639a0d3b16c284367b725459704dc15ddc03 (patch)
tree5b6217730fbc7969f65246817a9a02784a67806f
parent2afc5abe195551c5ee84658b1a15acbca453d6e0 (diff)
parentaf12b0f5da25d2c01bf57ef1af882b92c77f934e (diff)
downloadnextcloud-server-2361639a0d3b16c284367b725459704dc15ddc03.tar.gz
nextcloud-server-2361639a0d3b16c284367b725459704dc15ddc03.zip
Merge pull request #825 from owncloud/oc_namespace
Autoload classes with 'OC' namespace prefix.
-rw-r--r--lib/base.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index bde65dcc7d1..88628452613 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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');
}