// Fix #PSFV-452 (use spl_autoload_register())
This commit is contained in:
+1
-8
@@ -29,11 +29,4 @@
|
|||||||
require_once(dirname(__FILE__).'/alias.php');
|
require_once(dirname(__FILE__).'/alias.php');
|
||||||
require_once(dirname(__FILE__).'/../classes/Autoload.php');
|
require_once(dirname(__FILE__).'/../classes/Autoload.php');
|
||||||
|
|
||||||
function __autoload($classname)
|
spl_autoload_register(array(Autoload::getInstance(), 'load'));
|
||||||
{
|
|
||||||
if (function_exists('smartyAutoload') AND smartyAutoload($classname))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
Autoload::getInstance()->load($classname);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) {
|
|||||||
if (!defined('SMARTY_SPL_AUTOLOAD')) {
|
if (!defined('SMARTY_SPL_AUTOLOAD')) {
|
||||||
define('SMARTY_SPL_AUTOLOAD', 0);
|
define('SMARTY_SPL_AUTOLOAD', 0);
|
||||||
}
|
}
|
||||||
/* PrestaShop
|
|
||||||
if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {
|
if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {
|
||||||
$registeredAutoLoadFunctions = spl_autoload_functions();
|
$registeredAutoLoadFunctions = spl_autoload_functions();
|
||||||
if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
|
if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
|
||||||
@@ -82,7 +82,7 @@ if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR
|
|||||||
} else {
|
} else {
|
||||||
spl_autoload_register('smartyAutoload');
|
spl_autoload_register('smartyAutoload');
|
||||||
}
|
}
|
||||||
END */
|
|
||||||
/**
|
/**
|
||||||
* Load always needed external class files
|
* Load always needed external class files
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user