Revert "Portuguese staff updates"
[koha.git] / installer / InstallAuth.pm
index 5c983bd..2b2ccd5 100644 (file)
@@ -32,9 +32,7 @@ use CGI::Session;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision$' =~ /\d+/g;
-    shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
-};
+$VERSION = 3.00;
 
 =head1 NAME
 
@@ -44,6 +42,7 @@ InstallAuth - Authenticates Koha users for Install process
 
   use CGI;
   use InstallAuth;
+  use C4::Output;
 
   my $query = new CGI;
 
@@ -55,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
 
@@ -82,7 +77,6 @@ InstallAuth - Authenticates Koha users for Install process
 @EXPORT = qw(
   &checkauth
   &get_template_and_user
-  &setlanguagecookie
 );
 
 =item get_template_and_user
@@ -119,7 +113,7 @@ sub get_template_and_user {
       C4::Context->config('intrahtdocs') . "/prog/"
       . ( $language ? $language : "en" );
     my $template = HTML::Template::Pro->new(
-        filename          => "$path/" . $in->{template_name},
+        filename          => "$path/modules/" . $in->{template_name},
         die_on_bad_params => 1,
         global_vars       => 1,
         case_sensitive    => 1,
@@ -152,7 +146,7 @@ sub get_template_and_user {
             $template->param( CAN_user_reserveforothers => 1 );
             $template->param( CAN_user_borrow           => 1 );
             $template->param( CAN_user_editcatalogue    => 1 );
-            $template->param( CAN_user_updatecharge     => 1 );
+            $template->param( CAN_user_updatecharges    => 1 );
             $template->param( CAN_user_acquisition      => 1 );
             $template->param( CAN_user_management       => 1 );
             $template->param( CAN_user_tools            => 1 );
@@ -243,7 +237,7 @@ sub checkauth {
     if ( $sessionID = $query->cookie("CGISESSID") ) {
         C4::Context->_new_userenv($sessionID);
         my $session =
-          new CGI::Session( "driver:File", $sessionID,
+          new CGI::Session( "driver:File;serializer:yaml", $sessionID,
             { Directory => '/tmp' } );
         if ( $session->param('cardnumber') ) {
             C4::Context::set_userenv(
@@ -279,7 +273,7 @@ sub checkauth {
     }
     unless ($userid) {
         my $session =
-          new CGI::Session( "driver:File", undef, { Directory => '/tmp' } );
+          new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => '/tmp' } );
         $sessionID = $session->id;
         $userid    = $query->param('userid');
         C4::Context->_new_userenv($sessionID);
@@ -361,7 +355,7 @@ sub checkauth {
       C4::Context->config('intrahtdocs') . "/prog/"
       . ( $query->param('language') ? $query->param('language') : "en" );
     my $template = HTML::Template::Pro->new(
-        filename          => "$path/$template_name",
+        filename          => "$path/modules/$template_name",
         die_on_bad_params => 1,
         global_vars       => 1,
         case_sensitive    => 1,