From c62b0d1928f8b45a3f624b9b8c01948a9626c8cb Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 14 Jul 2007 19:54:59 +0000 Subject: Bug 388045: Move updating of cc_accessible and reporter_accessible into Bugzilla::Bug (from process_bug) Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/Object.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Bugzilla/Object.pm') diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 37e4b9349..3da4b9379 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -333,6 +333,12 @@ sub get_all { return @$objects; } +############################### +#### Validators ###### +############################### + +sub check_boolean { return $_[1] ? 1 : 0 } + 1; __END__ @@ -679,6 +685,20 @@ be the same as the name of the field in L, if it exists there. =back +=head2 Simple Validators + +You can use these in your subclass L or L. +Note that you have to reference them like C<\&Bugzilla::Object::check_boolean>, +you can't just write C<\&check_boolean>. + +=over + +=item C + +Returns C<1> if the passed-in value is true, C<0> otherwise. + +=back + =head1 CLASS FUNCTIONS =over -- cgit v1.2.3-24-g4f1b