// replace !is_core by substr($classname, -4) != 'Core'

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7947 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fBrignoli
2011-08-08 15:52:23 +00:00
parent f0ee603966
commit 58769824ce
+5 -4
View File
@@ -68,7 +68,7 @@ class Autoload
} }
/** /**
* Retrive informations about a class in classes index and load it * Retrieve informations about a class in classes index and load it
* *
* @param string $classname * @param string $classname
*/ */
@@ -78,7 +78,7 @@ class Autoload
$this->generateIndex(); $this->generateIndex();
// If $classname has not core suffix (E.g. Shop, Product) // If $classname has not core suffix (E.g. Shop, Product)
if (substr($classname, -4) == 'Core') if (substr($classname, -4) != 'Core')
{ {
// If requested class does not exist, load associated core class // If requested class does not exist, load associated core class
if (isset($this->index[$classname]) && !$this->index[$classname]) if (isset($this->index[$classname]) && !$this->index[$classname])
@@ -135,9 +135,9 @@ class Autoload
} }
/** /**
* Retrive recursively all classes in a directory and its subdirectories * Retrieve recursively all classes in a directory and its subdirectories
* *
* @param unknown_type $path Relativ path from root to the directory * @param string $path Relativ path from root to the directory
* @return array * @return array
*/ */
protected function getClassesFromDir($path) protected function getClassesFromDir($path)
@@ -166,3 +166,4 @@ class Autoload
return $classes; return $classes;
} }
} }