mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
This commit is contained in:
@@ -6,15 +6,6 @@
|
||||
* @subpackage PluginsFunction
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
|
||||
|
||||
/**
|
||||
* Smarty {html_select_date} plugin
|
||||
* Type: function<br>
|
||||
@@ -52,6 +43,12 @@ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
|
||||
*/
|
||||
function smarty_function_html_select_date($params)
|
||||
{
|
||||
if (!is_callable('smarty_function_escape_special_chars')) {
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
|
||||
}
|
||||
if (!is_callable('smarty_make_timestamp')) {
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
|
||||
}
|
||||
// generate timestamps used for month names only
|
||||
static $_month_timestamps = null;
|
||||
static $_current_year = null;
|
||||
|
||||
Reference in New Issue
Block a user