[Rt-commit] r8165 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Sat Jul 14 22:34:52 EDT 2007
Author: ruz
Date: Sat Jul 14 22:34:51 2007
New Revision: 8165
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/ObjectCustomFieldValues_Overlay.pm
Log:
* make HasEntry method case insensetive
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/ObjectCustomFieldValues_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/ObjectCustomFieldValues_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/ObjectCustomFieldValues_Overlay.pm Sat Jul 14 22:34:51 2007
@@ -104,10 +104,11 @@
sub HasEntry {
my $self = shift;
my $value = shift;
+ return undef unless defined $value && length $value;
#TODO: this could cache and optimize a fair bit.
foreach my $item ( @{$self->ItemsArrayRef} ) {
- return $item if $item->Content eq $value;
+ return $item if lc $item->Content eq lc $value;
}
return undef;
}
More information about the Rt-commit
mailing list