This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / FS / FS / cgp_rule_condition.pm
index f91b3e6..02ea172 100644 (file)
@@ -52,7 +52,6 @@ params
 
 rulenum
 
-
 =back
 
 =head1 METHODS
@@ -115,8 +114,8 @@ sub check {
   my $error = 
     $self->ut_numbern('ruleconditionnum')
     || $self->ut_text('condition')
-    || $self->ut_text('op')
-    || $self->ut_text('params')
+    || $self->ut_textn('op')
+    || $self->ut_textn('params')
     || $self->ut_foreign_key('rulenum', 'cgp_rule', 'rulenum')
   ;
   return $error if $error;
@@ -124,6 +123,17 @@ sub check {
   $self->SUPER::check;
 }
 
+=item arrayref
+
+Returns an array reference of the condition, op and params fields.
+
+=cut
+
+sub arrayref {
+  my $self = shift;
+  [ map $self->$_, qw( condition op params ) ];
+}
+
 =back
 
 =head1 BUGS