diff --git a/NEWS b/NEWS index c595995b..b886c68f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - updated popup_init to be xhtml compliant (Tom Oram, Monte) - fix filename bug with windows (Gary Loescher, Monte) - add ability to supply expire time in seconds when clearing cache or compile files (Monte) diff --git a/Smarty.class.php b/Smarty.class.php index b54a2ea2..a18785e7 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -947,15 +947,15 @@ function _generate_debug_output() { function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name) { // split tpl_path by the first colon - $file_path_parts = explode(':', $file_path, 2); + $_file_path_parts = explode(':', $file_path, 2); - if (count($file_path_parts) == 1) { + if (count($_file_path_parts) == 1) { // no resource type, treat as type "file" $resource_type = 'file'; - $resource_name = $file_path_parts[0]; + $resource_name = $_file_path_parts[0]; } else { - $resource_type = $file_path_parts[0]; - $resource_name = $file_path_parts[1]; + $resource_type = $_file_path_parts[0]; + $resource_name = $_file_path_parts[1]; if ($resource_type != 'file') { $this->_load_resource_plugin($resource_type); } @@ -965,13 +965,14 @@ function _generate_debug_output() { if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $resource_name)) { // relative pathname to $file_base_path // use the first directory where the file is found - foreach ((array)$file_base_path as $curr_path) { - if (@is_file($curr_path . DIR_SEP . $resource_name)) { - $resource_name = $curr_path . DIR_SEP . $resource_name; + foreach ((array)$file_base_path as $_curr_path) { + $_fullpath = $_curr_path . DIR_SEP . $resource_name; + if (@is_file($_fullpath)) { + $resource_name = $_fullpath; return true; } // didn't find the file, try include_path - if($this->_get_include_path($curr_path . DIR_SEP . $resource_name, $_include_path)) { + if($this->_get_include_path($_fullpath, $_include_path)) { $resource_name = $_include_path; return true; } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index b54a2ea2..a18785e7 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -947,15 +947,15 @@ function _generate_debug_output() { function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name) { // split tpl_path by the first colon - $file_path_parts = explode(':', $file_path, 2); + $_file_path_parts = explode(':', $file_path, 2); - if (count($file_path_parts) == 1) { + if (count($_file_path_parts) == 1) { // no resource type, treat as type "file" $resource_type = 'file'; - $resource_name = $file_path_parts[0]; + $resource_name = $_file_path_parts[0]; } else { - $resource_type = $file_path_parts[0]; - $resource_name = $file_path_parts[1]; + $resource_type = $_file_path_parts[0]; + $resource_name = $_file_path_parts[1]; if ($resource_type != 'file') { $this->_load_resource_plugin($resource_type); } @@ -965,13 +965,14 @@ function _generate_debug_output() { if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $resource_name)) { // relative pathname to $file_base_path // use the first directory where the file is found - foreach ((array)$file_base_path as $curr_path) { - if (@is_file($curr_path . DIR_SEP . $resource_name)) { - $resource_name = $curr_path . DIR_SEP . $resource_name; + foreach ((array)$file_base_path as $_curr_path) { + $_fullpath = $_curr_path . DIR_SEP . $resource_name; + if (@is_file($_fullpath)) { + $resource_name = $_fullpath; return true; } // didn't find the file, try include_path - if($this->_get_include_path($curr_path . DIR_SEP . $resource_name, $_include_path)) { + if($this->_get_include_path($_fullpath, $_include_path)) { $resource_name = $_include_path; return true; } diff --git a/libs/plugins/function.popup_init.php b/libs/plugins/function.popup_init.php index d653d6df..d23dc9ea 100644 --- a/libs/plugins/function.popup_init.php +++ b/libs/plugins/function.popup_init.php @@ -18,7 +18,7 @@ function smarty_function_popup_init($params, &$smarty) if (!empty($params['src'])) { echo ''."\n"; - echo ''."\n"; + echo ''."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); } diff --git a/plugins/function.popup_init.php b/plugins/function.popup_init.php index d653d6df..d23dc9ea 100644 --- a/plugins/function.popup_init.php +++ b/plugins/function.popup_init.php @@ -18,7 +18,7 @@ function smarty_function_popup_init($params, &$smarty) if (!empty($params['src'])) { echo ''."\n"; - echo ''."\n"; + echo ''."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); }