summaryrefslogtreecommitdiff
path: root/httemplate/elements/email-link.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-02-20 14:17:55 -0800
committerIvan Kohler <ivan@freeside.biz>2018-02-20 14:17:55 -0800
commit266e0c3c894568fb06a15dfbcf4a4eb9bc6989b3 (patch)
treee4f587217458762bbb0a2f5da49f2eb9954e0f3b /httemplate/elements/email-link.html
parented2d4de2ea785d30a54fb069b29f9618a40113c9 (diff)
fix broadband reporting with giant query URLs (large numbers of package defs, etc.), RT#76765
Diffstat (limited to 'httemplate/elements/email-link.html')
-rw-r--r--httemplate/elements/email-link.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/httemplate/elements/email-link.html b/httemplate/elements/email-link.html
index 16935cf98..012afff1a 100644
--- a/httemplate/elements/email-link.html
+++ b/httemplate/elements/email-link.html
@@ -1,18 +1,19 @@
% if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) {
-<A HREF="<%$p%>misc/email-customers.html?table=<%$table%>&agent_virt_agentnum=<%$agent_virt_agentnum%>&<%$query%>"><%$label%></A>
+<A HREF="<%$p%>misc/email-customers.html?<%$query%>"><%$label%></A>
% }
<%init>
my %opt = @_;
-my $table = $opt{'table'};
-my $agent_virt_agentnum = $opt{'agent_virt_agentnum'};
my $search_hash = $opt{'search_hash'};
-die "'table' required" if !$table;
+die "'table' required" if !$opt{'table'};
die "'search_hash' required" if !$search_hash;
my $uri = new URI;
my @params = map { $_, $search_hash->{$_} } sort keys %$search_hash;
-$uri->query_form(@params);
-my $query = $uri->query;
+$uri->query_form( @params,
+ table => $opt{'table'},
+ agent_virt_agentnum => $opt{'agent_virt_agentnum'}
+ );
+my $query = $m->scomp('/elements/create_uri_query', query=>$uri->query);
my $label = ($opt{'label'} || 'Email a notice to these customers');
</%init>