diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 03:10:10 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 03:10:10 -0700 |
commit | 1adadf36fca29f7d688bcbf84ae53f6ecc16e53c (patch) | |
tree | 99a28044263bab3ea3ae2d00b082b210b2d83f9f | |
parent | 535ed8369f701a184340a428e82cc8d7cc7588bb (diff) | |
parent | ceeb22aa5ff354419051b96e94d6239c69d7b206 (diff) | |
download | nextcloud-server-1adadf36fca29f7d688bcbf84ae53f6ecc16e53c.tar.gz nextcloud-server-1adadf36fca29f7d688bcbf84ae53f6ecc16e53c.zip |
Merge pull request #5071 from owncloud/fix-autoloader-master
Fix autoloader regression
-rw-r--r-- | lib/autoloader.php | 1 | ||||
-rw-r--r-- | tests/lib/autoloader.php | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index 8b12e6bc4b7..b5b58918372 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -77,6 +77,7 @@ class Autoloader { $paths[] = 'private/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php'); } elseif (strpos($class, 'OC\\') === 0) { $paths[] = 'private/' . strtolower(str_replace('\\', '/', substr($class, 3)) . '.php'); + $paths[] = strtolower(str_replace('\\', '/', substr($class, 3)) . '.php'); } elseif (strpos($class, 'OCP\\') === 0) { $paths[] = 'public/' . strtolower(str_replace('\\', '/', substr($class, 4)) . '.php'); } elseif (strpos($class, 'OCA\\') === 0) { diff --git a/tests/lib/autoloader.php b/tests/lib/autoloader.php index b182dc87477..314a8ebee8d 100644 --- a/tests/lib/autoloader.php +++ b/tests/lib/autoloader.php @@ -19,11 +19,11 @@ class AutoLoader extends \PHPUnit_Framework_TestCase { } public function testLeadingSlashOnClassName() { - $this->assertEquals(array('private/files/storage/local.php'), $this->loader->findClass('\OC\Files\Storage\Local')); + $this->assertEquals(array('private/files/storage/local.php', 'files/storage/local.php'), $this->loader->findClass('\OC\Files\Storage\Local')); } public function testNoLeadingSlashOnClassName() { - $this->assertEquals(array('private/files/storage/local.php'), $this->loader->findClass('OC\Files\Storage\Local')); + $this->assertEquals(array('private/files/storage/local.php', 'files/storage/local.php'), $this->loader->findClass('OC\Files\Storage\Local')); } public function testLegacyPath() { @@ -54,7 +54,7 @@ class AutoLoader extends \PHPUnit_Framework_TestCase { } public function testLoadCoreNamespace() { - $this->assertEquals(array('private/foo/bar.php'), $this->loader->findClass('OC\Foo\Bar')); + $this->assertEquals(array('private/foo/bar.php', 'foo/bar.php'), $this->loader->findClass('OC\Foo\Bar')); } public function testLoadCore() { |