mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 20:24:18 +02:00
fix filepaths to core files to use DIRECTORY_SEPARATOR
This commit is contained in:
@@ -19,7 +19,7 @@ function smarty_core_get_php_resource(&$params, &$this)
|
||||
{
|
||||
|
||||
$params['resource_base_path'] = $this->trusted_dir;
|
||||
require_once(SMARTY_DIR . 'core/core.parse_resource_name.php');
|
||||
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.parse_resource_name.php');
|
||||
smarty_core_parse_resource_name($params, $this);
|
||||
|
||||
/*
|
||||
@@ -33,7 +33,7 @@ function smarty_core_get_php_resource(&$params, &$this)
|
||||
} else {
|
||||
// test for file in include_path
|
||||
$_params = array('file_path' => $params['resource_name']);
|
||||
require_once(SMARTY_DIR . 'core/core.get_include_path.php');
|
||||
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php');
|
||||
if(smarty_core_get_include_path($_params, $this)) {
|
||||
$_include_path = $_params['new_file_path'];
|
||||
$_readable = true;
|
||||
@@ -57,7 +57,7 @@ function smarty_core_get_php_resource(&$params, &$this)
|
||||
|
||||
if ($_readable) {
|
||||
if ($this->security) {
|
||||
require_once(SMARTY_DIR . 'core/core.is_trusted.php');
|
||||
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_trusted.php');
|
||||
if (!smarty_core_is_trusted($params, $this)) {
|
||||
$this->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted');
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user