diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-04 14:06:42 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-04 14:06:42 +0200 |
commit | aebc330f269f3e88f2891cd13009cde2d50eb59a (patch) | |
tree | 7398bc68d581d01b18ba3e9e79c82491f1ecf871 /lib/autoloader.php | |
parent | c62dc4fa80d622ed7651029e9ddff2a6c6327143 (diff) | |
parent | 800bf0769ff4ea63c5dcc77eaaf1bce669b73d13 (diff) | |
download | nextcloud-server-aebc330f269f3e88f2891cd13009cde2d50eb59a.tar.gz nextcloud-server-aebc330f269f3e88f2891cd13009cde2d50eb59a.zip |
Merge branch 'master' into fixing-4011-master
Diffstat (limited to 'lib/autoloader.php')
-rw-r--r-- | lib/autoloader.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index 01841f831be..b5b58918372 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -73,9 +73,10 @@ class Autoloader { } } elseif (strpos($class, 'OC_') === 0) { // first check for legacy classes if underscores are used - $paths[] = 'legacy/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php'); - $paths[] = strtolower(str_replace('_', '/', substr($class, 3)) . '.php'); + $paths[] = 'private/legacy/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php'); + $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'); @@ -117,7 +118,11 @@ class Autoloader { // Does this PHP have an in-memory cache? We cache the paths there if ($this->constructingMemoryCache && !$this->memoryCache) { $this->constructingMemoryCache = false; - $this->memoryCache = \OC\Memcache\Factory::createLowLatency('Autoloader'); + try { + $this->memoryCache = \OC\Memcache\Factory::createLowLatency('Autoloader'); + } catch(\Exception $ex) { + // no caching then - fine with me + } } if ($this->memoryCache) { $pathsToRequire = $this->memoryCache->get($class); |