From 914dd56f4fe9139d35ca7f2153c95f62f132644e Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Tue, 9 Aug 2011 15:24:03 +0000 Subject: [PATCH] [-] Project : index file is now regenerated when a class is removed from the override directory --- classes/Autoload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Autoload.php b/classes/Autoload.php index 970e49406..4c15deaf7 100644 --- a/classes/Autoload.php +++ b/classes/Autoload.php @@ -74,7 +74,8 @@ class Autoload */ 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(); // If $classname has not core suffix (E.g. Shop, Product) @@ -118,6 +119,7 @@ class Autoload */ public function generateIndex() { + echo 'oui'; $classes = array_merge( $this->getClassesFromDir('classes/', true), $this->getClassesFromDir('override/classes/', false)