[-] Project : index file is now regenerated when a class is removed from the override directory
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7970 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -74,7 +74,8 @@ class Autoload
|
|||||||
*/
|
*/
|
||||||
public function load($classname)
|
public function load($classname)
|
||||||
{
|
{
|
||||||
if (!isset($this->index[$classname]))
|
// regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists
|
||||||
|
if (!isset($this->index[$classname]) || ($this->index[$classname] && !file_exists($this->root_dir.$this->index[$classname])))
|
||||||
$this->generateIndex();
|
$this->generateIndex();
|
||||||
|
|
||||||
// If $classname has not core suffix (E.g. Shop, Product)
|
// If $classname has not core suffix (E.g. Shop, Product)
|
||||||
@@ -118,6 +119,7 @@ class Autoload
|
|||||||
*/
|
*/
|
||||||
public function generateIndex()
|
public function generateIndex()
|
||||||
{
|
{
|
||||||
|
echo 'oui';
|
||||||
$classes = array_merge(
|
$classes = array_merge(
|
||||||
$this->getClassesFromDir('classes/', true),
|
$this->getClassesFromDir('classes/', true),
|
||||||
$this->getClassesFromDir('override/classes/', false)
|
$this->getClassesFromDir('override/classes/', false)
|
||||||
|
|||||||
Reference in New Issue
Block a user