From bd1f2c2ee4f8edf6139b811ec3fe746700409723 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Fri, 20 Nov 2009 01:24:31 -0500 Subject: [PATCH] added tem_auto_nonempty() --- template.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/template.php b/template.php index 9a512a6..396819d 100644 --- a/template.php +++ b/template.php @@ -325,6 +325,14 @@ function tem_auto_show(&$value) { return $value; } +# 'nonempty' sections will not be shown if the corresponding data +# value is the empty string + +function tem_auto_nonempty(&$value) { + if($value === '') $value = null; + return $value; +} + # 'evenodd' sections are given an 'evenodd' attribute whose value # alternates between 'even' and 'odd'. -- 1.7.10.4