- new SMARTY_SPL_AUTOLOAD constant to control the autoloader option

This commit is contained in:
Uwe.Tews
2009-11-09 17:26:59 +00:00
parent ff8c1050e4
commit 9f77baac25
2 changed files with 13 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
11/09/2009
- lexer/parser bugfix
- new SMARTY_SPL_AUTOLOAD constant to control the autoloader option
11/08/2009
- fixed alphanumeric array index

View File

@@ -87,8 +87,18 @@ define('SMARTY_PHP_ALLOW', 3); //-> escape tags as entities
/**
* register the class autoloader
*/
spl_autoload_register('smartyAutoload');
if (!defined('SMARTY_SPL_AUTOLOAD')) {
define('SMARTY_SPL_AUTOLOAD',0);
}
if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {
$registeredAutoLoadFunctions = spl_autoload_functions();
if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
spl_autoload_register();
}
} else {
spl_autoload_register('smartyAutoload');
}
/**
* This is the main Smarty class