[Rt-commit] r18865 - rt/3.999/branches/datetime/share/html/Elements

sartak at bestpractical.com sartak at bestpractical.com
Thu Mar 19 17:03:55 EDT 2009


Author: sartak
Date: Thu Mar 19 17:03:55 2009
New Revision: 18865

Modified:
   rt/3.999/branches/datetime/share/html/Elements/SelectDate

Log:
Clean up a messy conditional

Modified: rt/3.999/branches/datetime/share/html/Elements/SelectDate
==============================================================================
--- rt/3.999/branches/datetime/share/html/Elements/SelectDate	(original)
+++ rt/3.999/branches/datetime/share/html/Elements/SelectDate	Thu Mar 19 17:03:55 2009
@@ -47,8 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <input type="text" id="<% $name %>" name="<% $name %>" class="datetime" value="<% $value %>" size="<% $size %>" />
 <%init>
-unless ((defined $default) or 
-	($current <= 0)) {
+if (!defined($default) && $current > 0) {
 	my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
                                             localtime($current);
         $default = sprintf("%04d-%02d-%02d %02d:%02d",                         


More information about the Rt-commit mailing list