X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=installer%2FInstallAuth.pm;h=2b2ccd5b895e8d40e20fe09b8ad322a18c14853c;hb=369ebc659256c3908420fef4ab664879defc1a01;hp=5c983bd7fedaf7cc5b0e164a1330ebabc70841a9;hpb=836b9857ed9d6ff51a8d9da088b44dac9154fefb;p=koha.git diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm index 5c983bd7fe..2b2ccd5b89 100644 --- a/installer/InstallAuth.pm +++ b/installer/InstallAuth.pm @@ -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,