@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | function smarty_core_assemble_plugin_filepath($params, &$smarty) |
16 | 16 | { |
17 | - $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php'; |
|
17 | + $_plugin_filename = $params['type'].'.'.$params['name'].'.php'; |
|
18 | 18 | if (isset($smarty->_filepaths_cache[$_plugin_filename])) { |
19 | 19 | return $smarty->_filepaths_cache[$_plugin_filename]; |
20 | 20 | } |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | |
23 | 23 | foreach ((array)$smarty->plugins_dir as $_plugin_dir) { |
24 | 24 | |
25 | - $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; |
|
25 | + $_plugin_filepath = $_plugin_dir.DIRECTORY_SEPARATOR.$_plugin_filename; |
|
26 | 26 | |
27 | 27 | // see if path is relative |
28 | 28 | if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) { |
29 | 29 | $_relative_paths[] = $_plugin_dir; |
30 | 30 | // relative path, see if it is in the SMARTY_DIR |
31 | - if (@is_readable(SMARTY_DIR . $_plugin_filepath)) { |
|
32 | - $_return = SMARTY_DIR . $_plugin_filepath; |
|
31 | + if (@is_readable(SMARTY_DIR.$_plugin_filepath)) { |
|
32 | + $_return = SMARTY_DIR.$_plugin_filepath; |
|
33 | 33 | break; |
34 | 34 | } |
35 | 35 | } |
@@ -40,16 +40,16 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | - if($_return === false) { |
|
43 | + if ($_return === false) { |
|
44 | 44 | // still not found, try PHP include_path |
45 | - if(isset($_relative_paths)) { |
|
45 | + if (isset($_relative_paths)) { |
|
46 | 46 | foreach ((array)$_relative_paths as $_plugin_dir) { |
47 | 47 | |
48 | - $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; |
|
48 | + $_plugin_filepath = $_plugin_dir.DIRECTORY_SEPARATOR.$_plugin_filename; |
|
49 | 49 | |
50 | 50 | $_params = array('file_path' => $_plugin_filepath); |
51 | - require_once(SMARTY_CORE_DIR . 'core.get_include_path.php'); |
|
52 | - if(smarty_core_get_include_path($_params, $smarty)) { |
|
51 | + require_once(SMARTY_CORE_DIR.'core.get_include_path.php'); |
|
52 | + if (smarty_core_get_include_path($_params, $smarty)) { |
|
53 | 53 | $_return = $_params['new_file_path']; |
54 | 54 | break; |
55 | 55 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * @return boolean |
14 | 14 | */ |
15 | 15 | |
16 | - // $resource_type, $resource_name |
|
16 | + // $resource_type, $resource_name |
|
17 | 17 | |
18 | 18 | function smarty_core_is_trusted($params, &$smarty) |
19 | 19 | { |
@@ -22,10 +22,10 @@ |
||
22 | 22 | if (!empty($smarty->trusted_dir)) { |
23 | 23 | $_rp = realpath($params['resource_name']); |
24 | 24 | foreach ((array)$smarty->trusted_dir as $curr_dir) { |
25 | - if (!empty($curr_dir) && is_readable ($curr_dir)) { |
|
25 | + if (!empty($curr_dir) && is_readable($curr_dir)) { |
|
26 | 26 | $_cd = realpath($curr_dir); |
27 | 27 | if (strncmp($_rp, $_cd, strlen($_cd)) == 0 |
28 | - && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { |
|
28 | + && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) { |
|
29 | 29 | $_smarty_trusted = true; |
30 | 30 | break; |
31 | 31 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | function smarty_core_rm_auto($params, &$smarty) |
21 | 21 | { |
22 | 22 | if (!@is_dir($params['auto_base'])) |
23 | - return false; |
|
23 | + return false; |
|
24 | 24 | |
25 | 25 | if(!isset($params['auto_id']) && !isset($params['auto_source'])) { |
26 | 26 | $_params = array( |
@@ -22,18 +22,18 @@ discard block |
||
22 | 22 | if (!@is_dir($params['auto_base'])) |
23 | 23 | return false; |
24 | 24 | |
25 | - if(!isset($params['auto_id']) && !isset($params['auto_source'])) { |
|
25 | + if (!isset($params['auto_id']) && !isset($params['auto_source'])) { |
|
26 | 26 | $_params = array( |
27 | 27 | 'dirname' => $params['auto_base'], |
28 | 28 | 'level' => 0, |
29 | 29 | 'exp_time' => $params['exp_time'] |
30 | 30 | ); |
31 | - require_once(SMARTY_CORE_DIR . 'core.rmdir.php'); |
|
31 | + require_once(SMARTY_CORE_DIR.'core.rmdir.php'); |
|
32 | 32 | $_res = smarty_core_rmdir($_params, $smarty); |
33 | 33 | } else { |
34 | 34 | $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']); |
35 | 35 | |
36 | - if(isset($params['auto_source'])) { |
|
36 | + if (isset($params['auto_source'])) { |
|
37 | 37 | if (isset($params['extensions'])) { |
38 | 38 | $_res = false; |
39 | 39 | foreach ((array)$params['extensions'] as $_extension) |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | 'level' => 1, |
48 | 48 | 'exp_time' => $params['exp_time'] |
49 | 49 | ); |
50 | - require_once(SMARTY_CORE_DIR . 'core.rmdir.php'); |
|
50 | + require_once(SMARTY_CORE_DIR.'core.rmdir.php'); |
|
51 | 51 | $_res = smarty_core_rmdir($_params, $smarty); |
52 | 52 | } else { |
53 | 53 | // remove matching file names |
54 | 54 | $_handle = opendir($params['auto_base']); |
55 | 55 | $_res = true; |
56 | 56 | while (false !== ($_filename = readdir($_handle))) { |
57 | - if($_filename == '.' || $_filename == '..') { |
|
57 | + if ($_filename == '.' || $_filename == '..') { |
|
58 | 58 | continue; |
59 | - } elseif (substr($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) { |
|
60 | - $_res &= (bool)$smarty->_unlink($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, $params['exp_time']); |
|
59 | + } elseif (substr($params['auto_base'].DIRECTORY_SEPARATOR.$_filename, 0, strlen($_tname)) == $_tname) { |
|
60 | + $_res &= (bool)$smarty->_unlink($params['auto_base'].DIRECTORY_SEPARATOR.$_filename, $params['exp_time']); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -19,8 +19,9 @@ discard block |
||
19 | 19 | |
20 | 20 | function smarty_core_rm_auto($params, &$smarty) |
21 | 21 | { |
22 | - if (!@is_dir($params['auto_base'])) |
|
23 | - return false; |
|
22 | + if (!@is_dir($params['auto_base'])) { |
|
23 | + return false; |
|
24 | + } |
|
24 | 25 | |
25 | 26 | if(!isset($params['auto_id']) && !isset($params['auto_source'])) { |
26 | 27 | $_params = array( |
@@ -36,8 +37,9 @@ discard block |
||
36 | 37 | if(isset($params['auto_source'])) { |
37 | 38 | if (isset($params['extensions'])) { |
38 | 39 | $_res = false; |
39 | - foreach ((array)$params['extensions'] as $_extension) |
|
40 | - $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']); |
|
40 | + foreach ((array)$params['extensions'] as $_extension) { |
|
41 | + $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']); |
|
42 | + } |
|
41 | 43 | } else { |
42 | 44 | $_res = $smarty->_unlink($_tname, $params['exp_time']); |
43 | 45 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | function smarty_core_process_cached_inserts($params, &$smarty) |
15 | 15 | { |
16 | 16 | preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis', |
17 | - $params['results'], $match); |
|
17 | + $params['results'], $match); |
|
18 | 18 | list($cached_inserts, $insert_args) = $match; |
19 | 19 | |
20 | 20 | for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) { |
21 | 21 | if ($smarty->debugging) { |
22 | 22 | $_params = array(); |
23 | - require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); |
|
23 | + require_once(SMARTY_CORE_DIR.'core.get_microtime.php'); |
|
24 | 24 | $debug_start_time = smarty_core_get_microtime($_params, $smarty); |
25 | 25 | } |
26 | 26 | |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | |
30 | 30 | if (isset($args['script'])) { |
31 | 31 | $_params = array('resource_name' => $smarty->_dequote($args['script'])); |
32 | - require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); |
|
33 | - if(!smarty_core_get_php_resource($_params, $smarty)) { |
|
32 | + require_once(SMARTY_CORE_DIR.'core.get_php_resource.php'); |
|
33 | + if (!smarty_core_get_php_resource($_params, $smarty)) { |
|
34 | 34 | return false; |
35 | 35 | } |
36 | 36 | $resource_type = $_params['resource_type']; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i])); |
56 | 56 | if ($smarty->debugging) { |
57 | 57 | $_params = array(); |
58 | - require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); |
|
58 | + require_once(SMARTY_CORE_DIR.'core.get_microtime.php'); |
|
59 | 59 | $smarty->_smarty_debug_info[] = array('type' => 'insert', |
60 | 60 | 'filename' => 'insert_'.$name, |
61 | 61 | 'depth' => $smarty->_inclusion_depth, |
@@ -21,7 +21,7 @@ |
||
21 | 21 | function smarty_core_smarty_include_php($params, &$smarty) |
22 | 22 | { |
23 | 23 | $_params = array('resource_name' => $params['smarty_file']); |
24 | - require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); |
|
24 | + require_once(SMARTY_CORE_DIR.'core.get_php_resource.php'); |
|
25 | 25 | smarty_core_get_php_resource($_params, $smarty); |
26 | 26 | $_smarty_resource_type = $_params['resource_type']; |
27 | 27 | $_smarty_php_resource = $_params['php_resource']; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | if ($params['create_dirs']) { |
21 | 21 | $_params = array('dir' => $_dirname); |
22 | - require_once(SMARTY_CORE_DIR . 'core.create_dir_structure.php'); |
|
22 | + require_once(SMARTY_CORE_DIR.'core.create_dir_structure.php'); |
|
23 | 23 | smarty_core_create_dir_structure($_params, $smarty); |
24 | 24 | } |
25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $_tmp_file = tempnam($_dirname, 'wrt'); |
28 | 28 | |
29 | 29 | if (!($fd = @fopen($_tmp_file, 'wb'))) { |
30 | - $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt'); |
|
30 | + $_tmp_file = $_dirname.DIRECTORY_SEPARATOR.uniqid('wrt'); |
|
31 | 31 | if (!($fd = @fopen($_tmp_file, 'wb'))) { |
32 | 32 | $smarty->trigger_error("problem writing temporary file '$_tmp_file'"); |
33 | 33 | return false; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | foreach ($_path_array as $_include_path) { |
34 | 34 | if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) { |
35 | - $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path']; |
|
35 | + $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path']; |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | } |
@@ -20,19 +20,19 @@ |
||
20 | 20 | { |
21 | 21 | static $_path_array = null; |
22 | 22 | |
23 | - if(!isset($_path_array)) { |
|
23 | + if (!isset($_path_array)) { |
|
24 | 24 | $_ini_include_path = ini_get('include_path'); |
25 | 25 | |
26 | - if(strstr($_ini_include_path,';')) { |
|
26 | + if (strstr($_ini_include_path, ';')) { |
|
27 | 27 | // windows pathnames |
28 | - $_path_array = explode(';',$_ini_include_path); |
|
28 | + $_path_array = explode(';', $_ini_include_path); |
|
29 | 29 | } else { |
30 | - $_path_array = explode(':',$_ini_include_path); |
|
30 | + $_path_array = explode(':', $_ini_include_path); |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | foreach ($_path_array as $_include_path) { |
34 | - if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) { |
|
35 | - $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path']; |
|
34 | + if (@is_readable($_include_path.DIRECTORY_SEPARATOR.$params['file_path'])) { |
|
35 | + $params['new_file_path'] = $_include_path.DIRECTORY_SEPARATOR.$params['file_path']; |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;'; |
20 | 20 | |
21 | 21 | preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', |
22 | - $params['compiled_content'], $_match_source, PREG_SET_ORDER); |
|
22 | + $params['compiled_content'], $_match_source, PREG_SET_ORDER); |
|
23 | 23 | |
24 | 24 | // no nocache-parts found: done |
25 | 25 | if (count($_match_source)==0) return; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $_include_compiled .= "\n\n?>\n"; |
81 | 81 | |
82 | 82 | $_params = array('filename' => $_compile_path, |
83 | - 'contents' => $_include_compiled, 'create_dirs' => true); |
|
83 | + 'contents' => $_include_compiled, 'create_dirs' => true); |
|
84 | 84 | |
85 | 85 | require_once(SMARTY_CORE_DIR . 'core.write_file.php'); |
86 | 86 | smarty_core_write_file($_params, $smarty); |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | $params['compiled_content'], $_match_source, PREG_SET_ORDER); |
23 | 23 | |
24 | 24 | // no nocache-parts found: done |
25 | - if (count($_match_source)==0) return; |
|
25 | + if (count($_match_source) == 0) return; |
|
26 | 26 | |
27 | 27 | // convert the matched php-code to functions |
28 | - $_include_compiled = "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; |
|
29 | - $_include_compiled .= " compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n"; |
|
28 | + $_include_compiled = "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; |
|
29 | + $_include_compiled .= " compiled from ".strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':'))." */\n\n"; |
|
30 | 30 | |
31 | 31 | $_compile_path = $params['include_file_path']; |
32 | 32 | |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | |
39 | 39 | $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this'; |
40 | 40 | for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) { |
41 | - $_match =& $_match_source[$_i]; |
|
41 | + $_match = & $_match_source[$_i]; |
|
42 | 42 | $source = $_match[4]; |
43 | 43 | if ($this_varname == '_smarty') { |
44 | 44 | /* rename $this to $_smarty in the sourcecode */ |
45 | - $tokens = token_get_all('<?php ' . $_match[4]); |
|
45 | + $tokens = token_get_all('<?php '.$_match[4]); |
|
46 | 46 | |
47 | 47 | /* remove trailing <?php */ |
48 | 48 | $open_tag = ''; |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | if ($open_tag == '<?php ') break; |
57 | 57 | } |
58 | 58 | |
59 | - for ($i=0, $count = count($tokens); $i < $count; $i++) { |
|
59 | + for ($i = 0, $count = count($tokens); $i < $count; $i++) { |
|
60 | 60 | if (is_array($tokens[$i])) { |
61 | 61 | if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') { |
62 | - $tokens[$i] = '$' . $this_varname; |
|
62 | + $tokens[$i] = '$'.$this_varname; |
|
63 | 63 | } else { |
64 | 64 | $tokens[$i] = $tokens[$i][1]; |
65 | 65 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $_params = array('filename' => $_compile_path, |
83 | 83 | 'contents' => $_include_compiled, 'create_dirs' => true); |
84 | 84 | |
85 | - require_once(SMARTY_CORE_DIR . 'core.write_file.php'); |
|
85 | + require_once(SMARTY_CORE_DIR.'core.write_file.php'); |
|
86 | 86 | smarty_core_write_file($_params, $smarty); |
87 | 87 | return true; |
88 | 88 | } |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | $params['compiled_content'], $_match_source, PREG_SET_ORDER); |
23 | 23 | |
24 | 24 | // no nocache-parts found: done |
25 | - if (count($_match_source)==0) return; |
|
25 | + if (count($_match_source)==0) { |
|
26 | + return; |
|
27 | + } |
|
26 | 28 | |
27 | 29 | // convert the matched php-code to functions |
28 | 30 | $_include_compiled = "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; |
@@ -53,7 +55,9 @@ discard block |
||
53 | 55 | } else { |
54 | 56 | $open_tag .= $token; |
55 | 57 | } |
56 | - if ($open_tag == '<?php ') break; |
|
58 | + if ($open_tag == '<?php ') { |
|
59 | + break; |
|
60 | + } |
|
57 | 61 | } |
58 | 62 | |
59 | 63 | for ($i=0, $count = count($tokens); $i < $count; $i++) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @return true|null |
17 | 17 | */ |
18 | 18 | |
19 | - // $tpl_file, $cache_id, $compile_id, $results |
|
19 | + // $tpl_file, $cache_id, $compile_id, $results |
|
20 | 20 | |
21 | 21 | function smarty_core_write_cache_file($params, &$smarty) |
22 | 22 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if (!empty($smarty->cache_handler_func)) { |
69 | 69 | // use cache_handler function |
70 | 70 | call_user_func_array($smarty->cache_handler_func, |
71 | - array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], $smarty->_cache_info['expires'])); |
|
71 | + array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], $smarty->_cache_info['expires'])); |
|
72 | 72 | } else { |
73 | 73 | // use local cache file |
74 | 74 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | // put timestamp in cache header |
25 | 25 | $smarty->_cache_info['timestamp'] = time(); |
26 | - if ($smarty->cache_lifetime > -1){ |
|
26 | + if ($smarty->cache_lifetime > -1) { |
|
27 | 27 | // expiration set |
28 | 28 | $smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime; |
29 | 29 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $level = 0; |
45 | 45 | $j = 0; |
46 | - for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) { |
|
46 | + for ($i = 0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) { |
|
47 | 47 | if ($results[$i] == $match[0][$j]) { |
48 | 48 | // nocache tag |
49 | 49 | if ($match[1][$j]) { // closing tag |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | // prepend the cache header info into cache file |
65 | 65 | $_cache_info = serialize($smarty->_cache_info); |
66 | - $params['results'] = strlen($_cache_info) . "\n" . $_cache_info . $params['results']; |
|
66 | + $params['results'] = strlen($_cache_info)."\n".$_cache_info.$params['results']; |
|
67 | 67 | |
68 | 68 | if (!empty($smarty->cache_handler_func)) { |
69 | 69 | // use cache_handler function |
@@ -72,20 +72,20 @@ discard block |
||
72 | 72 | } else { |
73 | 73 | // use local cache file |
74 | 74 | |
75 | - if(!@is_writable($smarty->cache_dir)) { |
|
75 | + if (!@is_writable($smarty->cache_dir)) { |
|
76 | 76 | // cache_dir not writable, see if it exists |
77 | - if(!@is_dir($smarty->cache_dir)) { |
|
78 | - $smarty->trigger_error('the $cache_dir \'' . $smarty->cache_dir . '\' does not exist, or is not a directory.', E_USER_ERROR); |
|
77 | + if (!@is_dir($smarty->cache_dir)) { |
|
78 | + $smarty->trigger_error('the $cache_dir \''.$smarty->cache_dir.'\' does not exist, or is not a directory.', E_USER_ERROR); |
|
79 | 79 | return false; |
80 | 80 | } |
81 | - $smarty->trigger_error('unable to write to $cache_dir \'' . realpath($smarty->cache_dir) . '\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR); |
|
81 | + $smarty->trigger_error('unable to write to $cache_dir \''.realpath($smarty->cache_dir).'\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR); |
|
82 | 82 | return false; |
83 | 83 | } |
84 | 84 | |
85 | 85 | $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']); |
86 | 86 | $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id); |
87 | 87 | $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true); |
88 | - require_once(SMARTY_CORE_DIR . 'core.write_file.php'); |
|
88 | + require_once(SMARTY_CORE_DIR.'core.write_file.php'); |
|
89 | 89 | smarty_core_write_file($_params, $smarty); |
90 | 90 | return true; |
91 | 91 | } |
@@ -50,7 +50,9 @@ |
||
50 | 50 | $level--; |
51 | 51 | unset($results[$i]); |
52 | 52 | } else { // opening tag |
53 | - if ($level++ > 0) unset($results[$i]); |
|
53 | + if ($level++ > 0) { |
|
54 | + unset($results[$i]); |
|
55 | + } |
|
54 | 56 | } |
55 | 57 | $j++; |
56 | 58 | } elseif ($level > 0) { |