cvs: smarty / NEWS /libs/plugins function.html_options.php

From: Date: Mon, 17 Mar 2003 16:36:02 +0000
Subject: cvs: smarty / NEWS /libs/plugins function.html_options.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-465@lists.php.net to get a copy of this message
messju Mon Mar 17 11:36:02 2003 EDT Modified files: /smarty NEWS /smarty/libs/plugins function.html_options.php Log: html_options passthru all unknown paramters now Index: smarty/NEWS diff -u smarty/NEWS:1.312 smarty/NEWS:1.313 --- smarty/NEWS:1.312 Mon Mar 17 10:39:28 2003 +++ smarty/NEWS Mon Mar 17 11:36:01 2003 @@ -1,3 +1,4 @@ + - html_options passthru all unknown paramters now - fix link functionality of html_image, also make output XHTML compatible (Hinrich Donner, Monte) - append "@" to default modifier vars/args Index: smarty/libs/plugins/function.html_options.php diff -u smarty/libs/plugins/function.html_options.php:1.11 smarty/libs/plugins/function.html_options.php:1.12 --- smarty/libs/plugins/function.html_options.php:1.11 Fri Feb 28 10:08:14 2003 +++ smarty/libs/plugins/function.html_options.php Mon Mar 17 11:36:02 2003 @@ -35,8 +35,17 @@ } } + /* passthru all unknown params to $extra */ + $extra = ''; + unset($params['values']); + unset($params['output']); + unset($params['selected']); + unset($params['options']); + unset($params['name']); + foreach ($params as $key=>$value) $extra .= ' ' . $key . '="'. htmlspecialchars($value) . '"'; + if(!empty($name)) { - $html_result = '<select name="' . $name . '">' . "\n" . $html_result . '</select>' . "\n"; + $html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $html_result . '</select>' . "\n"; } return $html_result; }

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