// little optimization in autoloader, we exclude smarty classes of treatement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15527 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
5b959706cf
commit
6c305ba98c
1 file changed
+4
@@ -77,6 +77,10 @@ class Autoload
|
|||||||
*/
|
*/
|
||||||
public function load($classname)
|
public function load($classname)
|
||||||
{
|
{
|
||||||
|
// Smarty uses its own autoloader, so we exclude all Smarty classes
|
||||||
|
if (strpos(strtolower($classname), 'smarty_') === 0)
|
||||||
|
return;
|
||||||
|
|
||||||
// regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists
|
// 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])
|
if (!isset($this->index[$classname])
|
||||||
|| ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname]))
|
|| ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname]))
|
||||||
|
|||||||
Reference in new issue
Block a user