From: Jason Woofenden Date: Wed, 4 Nov 2009 09:29:23 +0000 (-0500) Subject: tem_auto_evenodd() starts on even X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=812c501d8bc3d69ac9a8766ade468ccc2d14263a tem_auto_evenodd() starts on even --- diff --git a/template.php b/template.php index 1667cde..b602573 100644 --- a/template.php +++ b/template.php @@ -279,7 +279,7 @@ function merge_templates($main, $tem) { # # # row content... -#
+#
# # # @@ -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;