cvs: smarty / NEWS Smarty.class.php /plugins function.popup_init.php

From: Date: Wed, 17 Jul 2002 13:42:29 +0000
Subject: cvs: smarty / NEWS Smarty.class.php /plugins function.popup_init.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-196@lists.php.net to get a copy of this message
mohrt Wed Jul 17 09:42:29 2002 EDT Modified files: /smarty NEWS Smarty.class.php /smarty/plugins function.popup_init.php Log: make popup_init xhtml compliant, minor variable name changes for consistancy Index: smarty/NEWS diff -u smarty/NEWS:1.219 smarty/NEWS:1.220 --- smarty/NEWS:1.219 Tue Jul 16 11:06:30 2002 +++ smarty/NEWS Wed Jul 17 09:42:29 2002 @@ -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) Index: smarty/Smarty.class.php diff -u smarty/Smarty.class.php:1.305 smarty/Smarty.class.php:1.306 --- smarty/Smarty.class.php:1.305 Tue Jul 16 11:04:01 2002 +++ smarty/Smarty.class.php Wed Jul 17 09:42:29 2002 @@ -947,15 +947,15 @@ 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 @@ 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; } Index: smarty/plugins/function.popup_init.php diff -u smarty/plugins/function.popup_init.php:1.5 smarty/plugins/function.popup_init.php:1.6 --- smarty/plugins/function.popup_init.php:1.5 Sat Jun 29 12:04:41 2002 +++ smarty/plugins/function.popup_init.php Wed Jul 17 09:42:29 2002 @@ -18,7 +18,7 @@ if (!empty($params['src'])) { echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n"; - echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n"; + echo '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>'."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); }

« previous php.smarty.cvs (#196) next »