mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
cleanup formatting
This commit is contained in:
@@ -125,9 +125,9 @@ class Smarty
|
|||||||
'PHP_TAGS' => false,
|
'PHP_TAGS' => false,
|
||||||
'MODIFIER_FUNCS' => array('count')
|
'MODIFIER_FUNCS' => array('count')
|
||||||
);
|
);
|
||||||
var $trusted_dir = array(); // directories where trusted templates
|
var $trusted_dir = array(); // directories where trusted templates & php scripts
|
||||||
// reside ($security is disabled during their
|
// reside ($security is disabled during their
|
||||||
// execution).
|
// inclusion/execution).
|
||||||
|
|
||||||
var $left_delimiter = '{'; // template tag delimiters.
|
var $left_delimiter = '{'; // template tag delimiters.
|
||||||
var $right_delimiter = '}';
|
var $right_delimiter = '}';
|
||||||
@@ -1162,7 +1162,8 @@ function _run_insert_handler($args)
|
|||||||
$this->_parse_file_path($this->trusted_dir, $this->_dequote($args['script']), $resource_type, $resource_name);
|
$this->_parse_file_path($this->trusted_dir, $this->_dequote($args['script']), $resource_type, $resource_name);
|
||||||
if ($this->security) {
|
if ($this->security) {
|
||||||
if ( $resource_type != 'file' || !@is_file($resource_name) ) {
|
if ( $resource_type != 'file' || !@is_file($resource_name) ) {
|
||||||
$this->_syntax_error("insert: $resource_type: $resource_name is not readable"); return false;
|
$this->_syntax_error("insert: $resource_type: $resource_name is not readable");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if ( !$this->_is_trusted($resource_type, $resource_name) ) {
|
if ( !$this->_is_trusted($resource_type, $resource_name) ) {
|
||||||
$this->_syntax_error("insert: $resource_type: $resource_name is not trusted");
|
$this->_syntax_error("insert: $resource_type: $resource_name is not trusted");
|
||||||
@@ -1395,7 +1396,7 @@ function _run_insert_handler($args)
|
|||||||
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
||||||
{
|
{
|
||||||
// determine if insert tags are present
|
// determine if insert tags are present
|
||||||
if (strpos($results,$this->_smarty_md5.'{insert_cache')) {
|
if (strpos($results,$this->_smarty_md5)) {
|
||||||
$this->_cache_info['insert_tags'] = true;
|
$this->_cache_info['insert_tags'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -125,9 +125,9 @@ class Smarty
|
|||||||
'PHP_TAGS' => false,
|
'PHP_TAGS' => false,
|
||||||
'MODIFIER_FUNCS' => array('count')
|
'MODIFIER_FUNCS' => array('count')
|
||||||
);
|
);
|
||||||
var $trusted_dir = array(); // directories where trusted templates
|
var $trusted_dir = array(); // directories where trusted templates & php scripts
|
||||||
// reside ($security is disabled during their
|
// reside ($security is disabled during their
|
||||||
// execution).
|
// inclusion/execution).
|
||||||
|
|
||||||
var $left_delimiter = '{'; // template tag delimiters.
|
var $left_delimiter = '{'; // template tag delimiters.
|
||||||
var $right_delimiter = '}';
|
var $right_delimiter = '}';
|
||||||
@@ -1162,7 +1162,8 @@ function _run_insert_handler($args)
|
|||||||
$this->_parse_file_path($this->trusted_dir, $this->_dequote($args['script']), $resource_type, $resource_name);
|
$this->_parse_file_path($this->trusted_dir, $this->_dequote($args['script']), $resource_type, $resource_name);
|
||||||
if ($this->security) {
|
if ($this->security) {
|
||||||
if ( $resource_type != 'file' || !@is_file($resource_name) ) {
|
if ( $resource_type != 'file' || !@is_file($resource_name) ) {
|
||||||
$this->_syntax_error("insert: $resource_type: $resource_name is not readable"); return false;
|
$this->_syntax_error("insert: $resource_type: $resource_name is not readable");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if ( !$this->_is_trusted($resource_type, $resource_name) ) {
|
if ( !$this->_is_trusted($resource_type, $resource_name) ) {
|
||||||
$this->_syntax_error("insert: $resource_type: $resource_name is not trusted");
|
$this->_syntax_error("insert: $resource_type: $resource_name is not trusted");
|
||||||
@@ -1395,7 +1396,7 @@ function _run_insert_handler($args)
|
|||||||
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
|
||||||
{
|
{
|
||||||
// determine if insert tags are present
|
// determine if insert tags are present
|
||||||
if (strpos($results,$this->_smarty_md5.'{insert_cache')) {
|
if (strpos($results,$this->_smarty_md5)) {
|
||||||
$this->_cache_info['insert_tags'] = true;
|
$this->_cache_info['insert_tags'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user