mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
fix $smarty.const.foo compiling, clean up double quoted strings,
allow full dollar var syntax in quotes again
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* table_attr = table attributes
|
||||
* tr_attr = table row attributes (arrays are cycled)
|
||||
* td_attr = table cell attributes (arrays are cycled)
|
||||
* cellpad = value to pad trailing cells with
|
||||
* trailpad = value to pad trailing cells with
|
||||
*
|
||||
* Examples: {table loop=$data}
|
||||
* {$table loop=$data cols=4 tr_attr='"bgcolor=red"'}
|
||||
@@ -23,11 +23,11 @@
|
||||
*/
|
||||
function smarty_function_html_table($params, &$smarty)
|
||||
{
|
||||
$table_attr = 'border=1';
|
||||
$table_attr = 'border="1"';
|
||||
$tr_attr = '';
|
||||
$td_attr = '';
|
||||
$cols = 3;
|
||||
$cellpad = ' ';
|
||||
$trailpad = ' ';
|
||||
|
||||
extract($params);
|
||||
|
||||
@@ -50,7 +50,7 @@ function smarty_function_html_table($params, &$smarty)
|
||||
$cells = $cols - $y % $cols;
|
||||
if($cells != $cols) {
|
||||
for($padloop = 0; $padloop < $cells; $padloop++) {
|
||||
$output .= "<td " . smarty_function_html_table_cycle('td', $td_attr) . ">$cellpad</td>\n";
|
||||
$output .= "<td " . smarty_function_html_table_cycle('td', $td_attr) . ">$trailpad</td>\n";
|
||||
}
|
||||
}
|
||||
$output .= "</tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user