improved fcc 477 report #7783
[freeside.git] / httemplate / search / elements / search.html
index 1312cac..b97a9b3 100644 (file)
@@ -171,6 +171,10 @@ Example:
 %
 <% include('search-xls.html',  header=>$header, rows=>$rows, opt=>\%opt ) %>
 %
+% } elsif ( $type eq 'xml' ) {
+%
+<% include('search-xml.html',  rows=>$rows, opt=>\%opt ) %>
+%
 % } else { # regular HTML
 %
 <% include('search-html.html',
@@ -194,7 +198,7 @@ my(%opt) = @_;
 
 my $curuser = $FS::CurrentUser::CurrentUser;
 
-my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|select|html(-print)?)$/
+my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/
            ? $1 : 'html' ;
 
 my %align = (
@@ -223,9 +227,13 @@ if($type =~ /csv|xls/) {
   } while ( exists($h->[$i]) );
 }
 
+# wtf?
 $opt{disable_download} = 0
   if $opt{disable_download} && $curuser->access_right('Configuration download');
 
+$opt{disable_download} = 1
+  if $opt{really_disable_download};
+
 my @link_agentnums = ();
 my $null_link = '';
 if ( $opt{'agent_virt'} ) {