]> source.dussan.org Git - nextcloud-server.git/commitdiff
Autoload classes with 'OC' namespace prefix.
authorThomas Tanghus <thomas@tanghus.net>
Tue, 11 Dec 2012 15:00:48 +0000 (16:00 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 11 Dec 2012 15:00:48 +0000 (16:00 +0100)
lib/base.php

index bde65dcc7d1d326acfbf2f2a3510752c132807a7..88628452613df53cf7b316792199a5e56bab3242 100644 (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');
                }