mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- revert autoloader optimizations because of unexplainable warning when using plugins https://github.com/smarty-php/smarty/issues/199
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.30-dev ===== (xx.xx.xx)
|
===== 3.1.30-dev ===== (xx.xx.xx)
|
||||||
|
02.03.2016
|
||||||
|
- revert autoloader optimizations because of unexplainable warning when using plugins https://github.com/smarty-php/smarty/issues/199
|
||||||
|
|
||||||
01.03.2016
|
01.03.2016
|
||||||
- bugfix template objects must be cached on $smarty->fetch('foo.tpl) calls incase the template is fetched
|
- bugfix template objects must be cached on $smarty->fetch('foo.tpl) calls incase the template is fetched
|
||||||
multiple times (forum topic 25909)
|
multiple times (forum topic 25909)
|
||||||
|
@@ -90,34 +90,17 @@ class Smarty_Autoloader
|
|||||||
public static function autoload($class)
|
public static function autoload($class)
|
||||||
{
|
{
|
||||||
$_class = strtolower($class);
|
$_class = strtolower($class);
|
||||||
|
if (strpos($_class, 'smarty') !== 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$file = self::$SMARTY_SYSPLUGINS_DIR . $_class . '.php';
|
$file = self::$SMARTY_SYSPLUGINS_DIR . $_class . '.php';
|
||||||
if (strpos($_class, 'smarty_internal_') === 0) {
|
|
||||||
if (strpos($_class, 'smarty_internal_compile_') === 0) {
|
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
require $file;
|
include $file;
|
||||||
}
|
} else if (isset(self::$rootClasses[ $_class ])) {
|
||||||
return;
|
$file = self::$SMARTY_SYSPLUGINS_DIR . self::$rootClasses[ $_class ] . '.php';
|
||||||
}
|
|
||||||
@include $file;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (preg_match('/^(smarty_(((template_(source|config|cache|compiled|resource_base))|((cached|compiled)?resource)|(variable|security)))|(smarty(bc)?)$)/',
|
|
||||||
$_class, $match)) {
|
|
||||||
if (!empty($match[ 3 ])) {
|
|
||||||
@include $file;
|
|
||||||
return;
|
|
||||||
} elseif (!empty($match[ 9 ]) && isset(self::$rootClasses[ $_class ])) {
|
|
||||||
$file = self::$rootClasses[ $_class ];
|
|
||||||
require $file;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (0 !== strpos($_class, 'smarty')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
require $file;
|
include $file;
|
||||||
return;
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user