X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FElements%2FQueryString;h=bade07f792c229a0db45bc24a1d40b34651a4400;hp=7d41f15e0cf98c7a4e2e17beb7fe4c300d6bc6ef;hb=e70abd21bab68b23488f7ef1ee2e693a3b365691;hpb=d4d0590bef31071e8809ec046717444b95b3f30a diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index 7d41f15e0..bade07f79 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,8 +47,17 @@ %# END BPS TAGGED BLOCK }}} <%init> my @params; -while ( (my $key, my $value) = each %ARGS ){ - push @params, $key."=".$m->interp->apply_escapes($value,'u'); +while ( my ($key, $value) = each %ARGS ){ + if( UNIVERSAL::isa( $value, 'ARRAY' ) ) { + push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value; + } else { + if (ref $value eq "ARRAY") { + push @params, $key."=".$m->interp->apply_escapes($_, 'u') + for @{$value}; + } else { + push @params, $key."=".$m->interp->apply_escapes($value||"",'u'); + } + } } return(join('&',@params));