diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-26 11:07:56 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-26 11:07:56 +0100 |
commit | 7e3b4754f62ae19f162653a3bd17cd2b1e217006 (patch) | |
tree | df844f17481f9955aec11b707e5827261079de35 /lib | |
parent | d4d954b2d99af48c25acb51e6e86032d9685bc2a (diff) | |
parent | ff1271c7f348b615998489c770741cec277b6684 (diff) | |
download | nextcloud-server-7e3b4754f62ae19f162653a3bd17cd2b1e217006.tar.gz nextcloud-server-7e3b4754f62ae19f162653a3bd17cd2b1e217006.zip |
Merge pull request #20031 from owncloud/remove-dead-code
Remove dead code from autoloader
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoloader.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index f60f5a358ca..b94ac6c5ee4 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -31,12 +31,9 @@ namespace OC; use \OCP\AutoloadNotAllowedException; class Autoloader { + /** @var bool */ private $useGlobalClassPath = true; - - private $prefixPaths = array(); - - private $classPaths = array(); - + /** @var array */ private $validRoots = []; /** @@ -91,9 +88,7 @@ class Autoloader { $class = trim($class, '\\'); $paths = array(); - if (array_key_exists($class, $this->classPaths)) { - $paths[] = $this->classPaths[$class]; - } else if ($this->useGlobalClassPath and array_key_exists($class, \OC::$CLASSPATH)) { + if ($this->useGlobalClassPath && array_key_exists($class, \OC::$CLASSPATH)) { $paths[] = \OC::$CLASSPATH[$class]; /** * @TODO: Remove this when necessary @@ -129,6 +124,10 @@ class Autoloader { return $paths; } + /** + * @param string $fullPath + * @return bool + */ protected function isValidPath($fullPath) { foreach ($this->validRoots as $root => $true) { if (substr($fullPath, 0, strlen($root) + 1) === $root . '/') { |