[Rt-commit] r8128 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Wed Jul 11 20:28:58 EDT 2007


Author: ruz
Date: Wed Jul 11 20:28:58 2007
New Revision: 8128

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/ObjectCustomFieldValues_Overlay.pm

Log:
::ObjectCustomFieldValues::HasEntry()
* return record instead of true value


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	Wed Jul 11 20:28:58 2007
@@ -95,8 +95,8 @@
 
 =sub HasEntry VALUE
 
-Returns true if this CustomFieldValues collection
-has an entry with content that eq VALUE
+If this collection has an entry with content that eq VALUE then
+returns the entry, otherwise returns undef.
 
 =cut
 
@@ -107,7 +107,7 @@
 
     #TODO: this could cache and optimize a fair bit.
     foreach my $item ( @{$self->ItemsArrayRef} ) {
-        return 1 if $item->Content eq $value;
+        return $item if $item->Content eq $value;
     }
     return undef;
 }


More information about the Rt-commit mailing list