freeside/FS/FS Record.pm,1.84,1.85
ivan
ivan at pouncequick.420.am
Fri Apr 30 14:58:18 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv1858
Modified Files:
Record.pm
Log Message:
accept empty zips for non-US countries...
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- Record.pm 28 Feb 2004 22:26:35 -0000 1.84
+++ Record.pm 30 Apr 2004 21:58:15 -0000 1.85
@@ -1307,9 +1307,13 @@
$self->getfield($field);
$self->setfield($field,$1);
} else {
- $self->getfield($field) =~ /^\s*(\w[\w\-\s]{2,8}\w)\s*$/
- or return gettext('illegal_zip'). " $field: ". $self->getfield($field);
- $self->setfield($field,$1);
+ if ( $self->getfield($field) =~ /^\s*$/ ) {
+ $self->setfield($field,'');
+ } else {
+ $self->getfield($field) =~ /^\s*(\w[\w\-\s]{2,8}\w)\s*$/
+ or return gettext('illegal_zip'). " $field: ". $self->getfield($field);
+ $self->setfield($field,$1);
+ }
}
'';
}
More information about the freeside-commits
mailing list