[Rt-commit] r9727 - rt/branches/3.6-RELEASE/html/Widgets

ruz at bestpractical.com ruz at bestpractical.com
Wed Nov 21 19:38:25 EST 2007


Author: ruz
Date: Wed Nov 21 19:38:24 2007
New Revision: 9727

Modified:
   rt/branches/3.6-RELEASE/html/Widgets/SavedSearch

Log:
* add handling of arguments with multiple values into Widgets/SavedSearch

Modified: rt/branches/3.6-RELEASE/html/Widgets/SavedSearch
==============================================================================
--- rt/branches/3.6-RELEASE/html/Widgets/SavedSearch	(original)
+++ rt/branches/3.6-RELEASE/html/Widgets/SavedSearch	Wed Nov 21 19:38:24 2007
@@ -136,8 +136,16 @@
 <form method="post" action="<% $Action %>" name="SaveSearch">
 <& /Search/Elements/EditSearches, Name => 'Owner', SearchType => $self->{SearchType}, AllowCopy => 0,
    CurrentSearch => $self->{CurrentSearch}, SearchId => $self->{SearchId}, Title => $Title  &><br />
-% for my $field (@{$self->{SearchFields}}) {
-<input type="hidden" class="hidden" name="<%$field%>" value="<%$ARGS{$field} || ''%>" />
+<%PERL>
+foreach my $field ( @{$self->{SearchFields}} ) {
+    if ( ref($ARGS{$field}) && ref($ARGS{$field}) ne 'ARRAY' ) {
+        $RT::Logger->error("Couldn't store '$field'. it's reference to ". ref($ARGS{$field}) );
+        next;
+    }
+    foreach my $value ( grep defined, ref($ARGS{$field})? @{ $ARGS{$field} } : $ARGS{$field} ) {
+</%PERL>
+<input type="hidden" class="hidden" name="<% $field %>" value="<% $value %>" />
+%   }
 % }
 </form>
 <%ARGS>


More information about the Rt-commit mailing list