[Bps-public-commit] r17248 - in RT-FormTools: lib/RT/Extension
sartak at bestpractical.com
sartak at bestpractical.com
Mon Dec 15 18:52:32 EST 2008
Author: sartak
Date: Mon Dec 15 18:52:32 2008
New Revision: 17248
Modified:
RT-FormTools/ (props changed)
RT-FormTools/lib/RT/Extension/FormTools.pm
Log:
r77213 at onn: sartak | 2008-12-15 18:52:26 -0500
Use a hash lookup for is_core_field instead of a regex
Modified: RT-FormTools/lib/RT/Extension/FormTools.pm
==============================================================================
--- RT-FormTools/lib/RT/Extension/FormTools.pm (original)
+++ RT-FormTools/lib/RT/Extension/FormTools.pm Mon Dec 15 18:52:32 2008
@@ -17,8 +17,17 @@
=cut
+my %is_core_field = map { $_ => 1 } qw(
+ Requestors
+ Cc
+ AdminCc
+ Subject
+ UpdateContent
+ Attach
+);
+
sub is_core_field {
- return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent|Attach)$/;
+ return $is_core_field{ $_[0] };
}
sub validate_cf {
More information about the Bps-public-commit
mailing list