Permalink
Browse files

kohabug 2105: prevent crash on IE7

Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.

Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.

Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
  • Loading branch information...
1 parent c1ae207 commit a7ba1bb941f9b7ff42754711c4af21e2f25e2e53 Galen Charlton committed with Joshua Ferraro May 13, 2008
Showing with 12 additions and 23 deletions.
  1. +2 −5 C4/Auth.pm
  2. +2 −1 cataloguing/value_builder/unimarc_field_100.pl
  3. +2 −5 installer/InstallAuth.pm
  4. +1 −1 members/mancredit.pl
  5. +5 −11 members/maninvoice.pl
View
@@ -58,6 +58,7 @@ C4::Auth - Authenticates Koha users
use CGI;
use C4::Auth;
+ use C4::Output;
my $query = new CGI;
@@ -72,11 +73,7 @@ C4::Auth - Authenticates Koha users
}
);
- print $query->header(
- -type => 'utf-8',
- -cookie => $cookie
- ), $template->output;
-
+ output_html_with_http_headers $query, $cookie, $template->output;
=head1 DESCRIPTION
@@ -23,6 +23,7 @@
use C4::Auth;
use CGI;
use C4::Context;
+use C4::Output;
=head1
@@ -122,7 +123,7 @@ sub plugin {
"f14" => $f14,
"f15$f15" => 1
);
- print $input->header( -type => 'utf-8', -cookie => $cookie ), $template->output;
+ output_html_with_http_headers $input, $cookie, $template->output;
}
1;
View
@@ -42,6 +42,7 @@ InstallAuth - Authenticates Koha users for Install process
use CGI;
use InstallAuth;
+ use C4::Output;
my $query = new CGI;
@@ -53,11 +54,7 @@ InstallAuth - Authenticates Koha users for Install process
flagsrequired => {borrow => 1},
});
- print $query->header(
- -type => 'utf-8',
- -cookie => $cookie
- ), $template->output;
-
+ output_html_with_http_headers $query, $cookie, $template->output;
=head1 DESCRIPTION
View
@@ -72,5 +72,5 @@
phone => $data->{'phone'},
email => $data->{'email'},
);
- print $input->header( -type => 'utf-8', -cookie => $cookie),$template->output;
+ output_html_with_http_headers $input, $cookie, $template->output;
}
View
@@ -55,10 +55,7 @@
$template->param('ITEMNUMBER' => 1);
}
$template->param('ERROR' => $error);
- print $input->header(
- -type => 'utf-8',
- -cookie => $cookie
- ),$template->output;
+ output_html_with_http_headers $input, $cookie, $template->output;
}
else {
print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber");
@@ -75,9 +72,9 @@
debug => 1,
});
-$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
-my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
-$template->param( picture => 1 ) if $picture;
+ $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
+ my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
+ $template->param( picture => 1 ) if $picture;
$template->param(
borrowernumber => $borrowernumber,
@@ -94,8 +91,5 @@
phone => $data->{'phone'},
email => $data->{'email'},
);
- print $input->header(
- -type => 'utf-8',
- -cookie => $cookie
- ),$template->output;
+ output_html_with_http_headers $input, $cookie, $template->output;
}

0 comments on commit a7ba1bb

Please sign in to comment.