mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
renamed Smarty::_get_plugin_filepath() to Smarty::get_plugin_filepath()
This commit is contained in:
3
NEWS
3
NEWS
@@ -1,3 +1,6 @@
|
||||
- rename "private" Smarty::_get_plugin_filepath() to public
|
||||
Smarty:: get_plugin_filepath() . _get_plugin_filepath() is kept as
|
||||
a wrapper for backward compatibility (messju)
|
||||
- remove touch() call that made the compiled-template's timestamp the
|
||||
same as the source-template's one. (messju)
|
||||
- add assign attribute to html_checkboxes and html_radios
|
||||
|
@@ -1309,7 +1309,7 @@ class Smarty
|
||||
*/
|
||||
function config_load($file, $section = null, $scope = 'global')
|
||||
{
|
||||
require_once($this->_get_plugin_filepath('function', 'config_load'));
|
||||
require_once($this->get_plugin_filepath('function', 'config_load'));
|
||||
smarty_function_config_load(array('file' => $file, 'section' => $section, 'scope' => $scope), $this);
|
||||
}
|
||||
|
||||
@@ -1352,13 +1352,22 @@ class Smarty
|
||||
* @param string $name
|
||||
* @return string|false
|
||||
*/
|
||||
function _get_plugin_filepath($type, $name)
|
||||
function get_plugin_filepath($type, $name)
|
||||
{
|
||||
$_params = array('type' => $type, 'name' => $name);
|
||||
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.assemble_plugin_filepath.php');
|
||||
return smarty_core_assemble_plugin_filepath($_params, $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* wrapper (kept for compatibility)
|
||||
*
|
||||
*/
|
||||
function _get_plugin_filepath($type, $name)
|
||||
{
|
||||
return $this->get_plugin_filepath($type, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* test if resource needs compiling
|
||||
*
|
||||
|
@@ -590,7 +590,7 @@ class Smarty_Compiler extends Smarty {
|
||||
* Otherwise we need to load plugin file and look for the function
|
||||
* inside it.
|
||||
*/
|
||||
else if ($plugin_file = $this->_get_plugin_filepath('compiler', $tag_command)) {
|
||||
else if ($plugin_file = $this->get_plugin_filepath('compiler', $tag_command)) {
|
||||
$found = true;
|
||||
|
||||
include_once $plugin_file;
|
||||
@@ -665,7 +665,7 @@ class Smarty_Compiler extends Smarty {
|
||||
* Otherwise we need to load plugin file and look for the function
|
||||
* inside it.
|
||||
*/
|
||||
else if ($plugin_file = $this->_get_plugin_filepath('block', $tag_command)) {
|
||||
else if ($plugin_file = $this->get_plugin_filepath('block', $tag_command)) {
|
||||
$found = true;
|
||||
|
||||
include_once $plugin_file;
|
||||
@@ -749,7 +749,7 @@ class Smarty_Compiler extends Smarty {
|
||||
* Otherwise we need to load plugin file and look for the function
|
||||
* inside it.
|
||||
*/
|
||||
else if ($plugin_file = $this->_get_plugin_filepath('function', $tag_command)) {
|
||||
else if ($plugin_file = $this->get_plugin_filepath('function', $tag_command)) {
|
||||
$found = true;
|
||||
|
||||
include_once $plugin_file;
|
||||
@@ -1894,7 +1894,7 @@ class Smarty_Compiler extends Smarty {
|
||||
}
|
||||
|
||||
if (empty($this->_plugins['modifier'][$_modifier_name])
|
||||
&& !$this->_get_plugin_filepath('modifier', $_modifier_name)
|
||||
&& !$this->get_plugin_filepath('modifier', $_modifier_name)
|
||||
&& function_exists($_modifier_name)) {
|
||||
if ($this->security && !in_array($_modifier_name, $this->security_settings['MODIFIER_FUNCS'])) {
|
||||
$this->_trigger_fatal_error("[plugin] (secure mode) modifier '$_modifier_name' is not allowed" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
|
||||
|
@@ -54,7 +54,7 @@ function smarty_core_load_plugins($params, &$smarty)
|
||||
}
|
||||
}
|
||||
|
||||
$_plugin_file = $smarty->_get_plugin_filepath($_type, $_name);
|
||||
$_plugin_file = $smarty->get_plugin_filepath($_type, $_name);
|
||||
|
||||
if (! $_found = ($_plugin_file != false)) {
|
||||
$_message = "could not load plugin file '$_type.$_name.php'\n";
|
||||
|
@@ -41,7 +41,7 @@ function smarty_core_load_resource_plugin($params, &$smarty)
|
||||
return;
|
||||
}
|
||||
|
||||
$_plugin_file = $smarty->_get_plugin_filepath('resource', $params['type']);
|
||||
$_plugin_file = $smarty->get_plugin_filepath('resource', $params['type']);
|
||||
$_found = ($_plugin_file != false);
|
||||
|
||||
if ($_found) { /*
|
||||
|
Reference in New Issue
Block a user