[Rt-commit] r17721 - rt/3.8/trunk/lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Mon Jan 12 20:43:07 EST 2009


Author: ruz
Date: Mon Jan 12 20:43:06 2009
New Revision: 17721

Modified:
   rt/3.8/trunk/lib/RT/Interface/Web.pm

Log:
* Remove blank Values since the magic field will take care of this. Sometimes
  the browser gives you a blank value which causes CFs to be processed twice
  Thanks to Philip Kime


Modified: rt/3.8/trunk/lib/RT/Interface/Web.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Interface/Web.pm	(original)
+++ rt/3.8/trunk/lib/RT/Interface/Web.pm	Mon Jan 12 20:43:06 2009
@@ -1148,6 +1148,15 @@
     my $cf = $args{'CustomField'};
     my $cf_type = $cf->Type;
 
+    # Remove blank Values since the magic field will take care of this. Sometimes
+    # the browser gives you a blank value which causes CFs to be processed twice
+    if ( defined $args{'ARGS'}->{'Values'}
+        && !length $args{'ARGS'}->{'Values'}
+        && $args{'ARGS'}->{'Values-Magic'}
+    ) {
+        delete $args{'ARGS'}->{'Values'};
+    }
+
     my @results;
     foreach my $arg ( keys %{ $args{'ARGS'} } ) {
         # skip category argument


More information about the Rt-commit mailing list