diff --git a/Smarty.class.php b/Smarty.class.php index 18555c73..cb85a9eb 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -527,6 +527,12 @@ class Smarty $output .= "{$section_props}['loop'] = count($attr_value);\n"; break; + case 'show': + if (is_bool($attr_value)) + $attr_value = $attr_value ? 'true' : 'false'; + $output .= "{$section_props}['$attr_name'] = $attr_value;\n"; + break; + default: $output .= "{$section_props}['$attr_name'] = $attr_value;\n"; break; diff --git a/demo/templates/index.tpl b/demo/templates/index.tpl index b3f78ca6..75b027b0 100644 --- a/demo/templates/index.tpl +++ b/demo/templates/index.tpl @@ -14,7 +14,6 @@ My interests are: {else} * {$outer/FirstName} {$outer/LastName} {/if} - {$outer/date|date_format:"%B %d, %Y"} {sectionelse} none {/section} diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 18555c73..cb85a9eb 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -527,6 +527,12 @@ class Smarty $output .= "{$section_props}['loop'] = count($attr_value);\n"; break; + case 'show': + if (is_bool($attr_value)) + $attr_value = $attr_value ? 'true' : 'false'; + $output .= "{$section_props}['$attr_name'] = $attr_value;\n"; + break; + default: $output .= "{$section_props}['$attr_name'] = $attr_value;\n"; break; diff --git a/templates/index.tpl b/templates/index.tpl index b3f78ca6..75b027b0 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -14,7 +14,6 @@ My interests are: {else} * {$outer/FirstName} {$outer/LastName} {/if} - {$outer/date|date_format:"%B %d, %Y"} {sectionelse} none {/section}