mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
Upload 3.1.21
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
* @author Rodney Rehm
|
* @author Rodney Rehm
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @version 3.1.20
|
* @version 3.1.21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,7 +109,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = 'Smarty-3.1.20';
|
const SMARTY_VERSION = 'Smarty-3.1.21';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
@@ -661,6 +661,14 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $merged_templates_func = array();
|
public $merged_templates_func = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache of is_file results of loadPlugin()
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public static $_is_file_cache= array();
|
||||||
|
|
||||||
/**#@-*/
|
/**#@-*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1371,9 +1379,8 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
// if type is "internal", get plugin from sysplugins
|
// if type is "internal", get plugin from sysplugins
|
||||||
if (strtolower($_name_parts[1]) == 'internal') {
|
if (strtolower($_name_parts[1]) == 'internal') {
|
||||||
$file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php';
|
$file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php';
|
||||||
if (file_exists($file)) {
|
if (isset(self::$_is_file_cache[$file]) ? self::$_is_file_cache[$file] : self::$_is_file_cache[$file] = is_file($file)) {
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
return $file;
|
return $file;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -1391,9 +1398,8 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
$_plugin_dir . strtolower($_plugin_filename),
|
$_plugin_dir . strtolower($_plugin_filename),
|
||||||
);
|
);
|
||||||
foreach ($names as $file) {
|
foreach ($names as $file) {
|
||||||
if (file_exists($file)) {
|
if (isset(self::$_is_file_cache[$file]) ? self::$_is_file_cache[$file] : self::$_is_file_cache[$file] = is_file($file)) {
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
if ($this->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
|
if ($this->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
|
||||||
|
Reference in New Issue
Block a user