summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-07-14 21:54:59 +0200
committermkanat%bugzilla.org <>2007-07-14 21:54:59 +0200
commitc62b0d1928f8b45a3f624b9b8c01948a9626c8cb (patch)
tree8477d0e4a310643941569f2695f1584a1877ac0d /Bugzilla/Object.pm
parent65d406682dbaaa2a50b468387a22353a10a84bbd (diff)
downloadbugzilla-c62b0d1928f8b45a3f624b9b8c01948a9626c8cb.tar.gz
bugzilla-c62b0d1928f8b45a3f624b9b8c01948a9626c8cb.tar.xz
Bug 388045: Move updating of cc_accessible and reporter_accessible into Bugzilla::Bug (from process_bug)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Object.pm')
-rw-r--r--Bugzilla/Object.pm20
1 files changed, 20 insertions, 0 deletions
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</VALIDATORS>, if it exists there.
=back
+=head2 Simple Validators
+
+You can use these in your subclass L</VALIDATORS> or L</UPDATE_VALIDATORS>.
+Note that you have to reference them like C<\&Bugzilla::Object::check_boolean>,
+you can't just write C<\&check_boolean>.
+
+=over
+
+=item C<check_boolean>
+
+Returns C<1> if the passed-in value is true, C<0> otherwise.
+
+=back
+
=head1 CLASS FUNCTIONS
=over