JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
tem_auto_evenodd() starts on even
authorJason Woofenden <jason@jasonwoof.com>
Wed, 4 Nov 2009 09:29:23 +0000 (04:29 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 4 Nov 2009 09:29:23 +0000 (04:29 -0500)
template.php

index 1667cde..b602573 100644 (file)
@@ -279,7 +279,7 @@ function merge_templates($main, $tem) {
 #      <!--~rows {~-->
 #              <!--~row {~-->
 #                      row content...
-#                      <!--~separator sep {~--><hr><!--~}"-->
+#                      <!--~separator sep {~--><hr><!--~}~-->
 #              <!--~}~-->
 #      <!--~}~-->
 #
@@ -290,7 +290,7 @@ function tem_auto_sep(&$value, $key, $context) {
 }
 
 # 'show' sections will be shown unless the corresponding data value
-# is false.  We check only for false; 0 or '' will not work.
+# is false (only false, not 0 or '' or array()).
 
 function tem_auto_show(&$value) {
        if($value !== false) $value = array(array());
@@ -301,7 +301,7 @@ function tem_auto_show(&$value) {
 # alternates between 'even' and 'odd'.
 
 function tem_auto_evenodd(&$values) {
-       $even = false;
+       $even = true;
        foreach($values as &$value) {
                $value['evenodd'] = $even ? 'even' : 'odd';
                $even = !$even;