[interchange: 1/2] Keep logic of 'defined' for commify filter, so [filter commify.0] works.
Josh Lavin
interchange-cvs at icdevgroup.org
Tue Feb 19 22:12:23 UTC 2013
commit b4be8c300dc210e4888c3e8592c46c356a03123d
Author: Josh Lavin <josh at perusion.com>
Date: Tue Feb 19 14:11:09 2013 -0800
Keep logic of 'defined' for commify filter, so [filter commify.0] works.
code/Filter/commify.filter | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/code/Filter/commify.filter b/code/Filter/commify.filter
index 0f561bc..521172f 100644
--- a/code/Filter/commify.filter
+++ b/code/Filter/commify.filter
@@ -5,8 +5,6 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
-#
-# $Id: commify.filter,v 1.4 2007-03-30 23:40:44 pajamian Exp $
CodeDef commify Filter
CodeDef commify Description Commify
@@ -14,7 +12,7 @@ CodeDef commify Routine <<EOR
sub {
my ($val, $tag, $places) = @_;
$places = 2 unless defined $places;
- $val = sprintf("%.${places}f", $val) if $places;
+ $val = sprintf("%.${places}f", $val) if defined $places;
return Vend::Util::commify($val);
}
EOR
More information about the interchange-cvs
mailing list