# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
use warnings;
my $order = $input->param("order");
my $output = $input->param("output");
my $basename = $input->param("basename");
-my $mime = $input->param("MIME");
-our $sep = $input->param("sep");
+our $sep = $input->param("sep") || '';
$sep = "\t" if ($sep eq 'tabulation');
my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(datas => \@datas,
do_it => 1);
}else{
- binmode STDOUT, ':utf8';
+ binmode STDOUT, ':encoding(UTF-8)';
print $input->header(-type => 'application/vnd.sun.xml.calc',
-encoding => 'utf-8',
-name => "$basename.csv",
## We generate branchlist
my $branches=GetBranches();
my @branchloop;
- foreach (keys %$branches) {
+ foreach (sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches) {
my $thisbranch = ''; # FIXME: populate $thisbranch to preselect one
my %row = (branchcode => $_,
selected => ($thisbranch eq $_ ? 1 : 0),
push @branchloop, \%row;
}
- my @mime = ( C4::Context->preference("MIME") );
- # warn 'MIME(s): ' . join ' ', @mime;
my $CGIextChoice=CGI::scrolling_list(
-name => 'MIME',
-id => 'MIME',
- -values => \@mime,
+ -values => ['CSV'], # FIXME translation
-size => 1,
-multiple => 0 );
my $CGIsepChoice=GetDelimiterChoices;
branches => \@branchloop);
}
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
+output_html_with_http_headers $input, $cookie, $template->output;