summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2010-12-26 04:09:26 +0000
committerlevinse <levinse>2010-12-26 04:09:26 +0000
commit7353f670ef61e617a9dfb6c258907eb70e0345f6 (patch)
tree8edcaf56f44a9de5b7bbc5e76c0b7a6641480616 /FS/FS/Record.pm
parent50053b94beac4aef39ddc007c851184649d49564 (diff)
added basic LNP capability to svc_phone including SS, RT10948
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 16520f4..2e2612e 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -2589,6 +2589,20 @@ sub ut_enum {
return "Illegal (enum) field $field: ". $self->getfield($field);
}
+=item ut_enumn COLUMN CHOICES_ARRAYREF
+
+Like ut_enum, except the null value is also allowed.
+
+=cut
+
+sub ut_enumn {
+ my( $self, $field, $choices ) = @_;
+ $self->getfield($field)
+ ? $self->ut_enum($field, $choices)
+ : '';
+}
+
+
=item ut_foreign_key COLUMN FOREIGN_TABLE FOREIGN_COLUMN
Check/untaint a foreign column key. Call a regular ut_ method (like ut_number)