kohabug 2105: prevent crash on IE7
authorGalen Charlton <galen.charlton@liblime.com>
Tue, 13 May 2008 21:40:15 +0000 (16:40 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 13 May 2008 22:40:36 +0000 (17:40 -0500)
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>
C4/Auth.pm
cataloguing/value_builder/unimarc_field_100.pl
installer/InstallAuth.pm
members/mancredit.pl
members/maninvoice.pl

index 0e97604..3951892 100755 (executable)
@@ -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
 
index 5f8e36e..e159430 100755 (executable)
@@ -23,6 +23,7 @@ use strict;
 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;
index fcc47fb..73cb814 100644 (file)
@@ -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
 
index d3d182d..714ce91 100755 (executable)
@@ -72,5 +72,5 @@ if ($add){
                    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;
 }
index 18371aa..f3ad4cb 100755 (executable)
@@ -55,10 +55,7 @@ if ($add){
                        $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 @@ if ($add){
                                        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 @@ $template->param( picture => 1 ) if $picture;
                                        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;
 }