Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tem_auto_evenodd() starts on even
[wfpl.git]
/
template.php
diff --git
a/template.php
b/template.php
index
1667cde
..
b602573
100644
(file)
--- a/
template.php
+++ b/
template.php
@@
-279,7
+279,7
@@
function merge_templates($main, $tem) {
# <!--~rows {~-->
# <!--~row {~-->
# row content...
# <!--~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
}
# '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());
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) {
# 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;
foreach($values as &$value) {
$value['evenodd'] = $even ? 'even' : 'odd';
$even = !$even;