X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcgp_rule_condition.pm;h=f91b3e6f614fb6917f321b5284577ee1d6a880d4;hp=a8b7e560c16d51b028a7bfc0de98ae1089c7152b;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hpb=3a201934245c2e72b167804a6d512e0e6d435f65;ds=sidebyside diff --git a/FS/FS/cgp_rule_condition.pm b/FS/FS/cgp_rule_condition.pm index a8b7e560c..f91b3e6f6 100644 --- a/FS/FS/cgp_rule_condition.pm +++ b/FS/FS/cgp_rule_condition.pm @@ -3,6 +3,7 @@ package FS::cgp_rule_condition; use strict; use base qw( FS::Record ); use FS::Record qw( qsearch qsearchs ); +use FS::cgp_rule; =head1 NAME @@ -25,8 +26,9 @@ FS::cgp_rule_condition - Object methods for cgp_rule_condition records =head1 DESCRIPTION -An FS::cgp_rule_condition object represents an example. FS::cgp_rule_condition inherits from -FS::Record. The following fields are currently supported: +An FS::cgp_rule_condition object represents a mail filtering condition. +FS::cgp_rule_condition inherits from FS::Record. The following fields are +currently supported: =over 4 @@ -59,7 +61,7 @@ rulenum =item new HASHREF -Creates a new example. To add the example to the database, see L<"insert">. +Creates a new condition. To add the condition to the database, see L<"insert">. Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the I method. @@ -98,7 +100,7 @@ returns the error, otherwise returns false. =item check -Checks all fields to make sure this is a valid example. If there is +Checks all fields to make sure this is a valid condition. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods. @@ -115,7 +117,7 @@ sub check { || $self->ut_text('condition') || $self->ut_text('op') || $self->ut_text('params') - || $self->ut_number('rulenum') + || $self->ut_foreign_key('rulenum', 'cgp_rule', 'rulenum') ; return $error if $error; @@ -126,8 +128,6 @@ sub check { =head1 BUGS -The author forgot to customize this manpage. - =head1 SEE ALSO L, schema.html from the base documentation.