Skip to content
Snippets Groups Projects
Commit ff1271c7 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Remove dead code

Those variables are never written to. Thus this is dead code which should be removed.
parent 172bcf2d
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,9 @@ namespace OC; ...@@ -31,12 +31,9 @@ namespace OC;
use \OCP\AutoloadNotAllowedException; use \OCP\AutoloadNotAllowedException;
class Autoloader { class Autoloader {
/** @var bool */
private $useGlobalClassPath = true; private $useGlobalClassPath = true;
/** @var array */
private $prefixPaths = array();
private $classPaths = array();
private $validRoots = []; private $validRoots = [];
/** /**
...@@ -91,9 +88,7 @@ class Autoloader { ...@@ -91,9 +88,7 @@ class Autoloader {
$class = trim($class, '\\'); $class = trim($class, '\\');
$paths = array(); $paths = array();
if (array_key_exists($class, $this->classPaths)) { if ($this->useGlobalClassPath && array_key_exists($class, \OC::$CLASSPATH)) {
$paths[] = $this->classPaths[$class];
} else if ($this->useGlobalClassPath and array_key_exists($class, \OC::$CLASSPATH)) {
$paths[] = \OC::$CLASSPATH[$class]; $paths[] = \OC::$CLASSPATH[$class];
/** /**
* @TODO: Remove this when necessary * @TODO: Remove this when necessary
...@@ -129,6 +124,10 @@ class Autoloader { ...@@ -129,6 +124,10 @@ class Autoloader {
return $paths; return $paths;
} }
/**
* @param string $fullPath
* @return bool
*/
protected function isValidPath($fullPath) { protected function isValidPath($fullPath) {
foreach ($this->validRoots as $root => $true) { foreach ($this->validRoots as $root => $true) {
if (substr($fullPath, 0, strlen($root) + 1) === $root . '/') { if (substr($fullPath, 0, strlen($root) + 1) === $root . '/') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment