fixed invocation of CGI::Carp::set_message
[koha_gimpoz] / C4 / Auth.pm
index d5b14d7..ba7f7dd 100755 (executable)
@@ -275,6 +275,7 @@ sub get_template_and_user {
                        canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'),
                        intranetreadinghistory => C4::Context->preference("intranetreadinghistory"),
                        noItemTypeImages => C4::Context->preference("noItemTypeImages"),
+            singleBranchMode => C4::Context->preference("singleBranchMode"),
         );
     }
     else {
@@ -286,6 +287,7 @@ sub get_template_and_user {
             KohaAdminEmailAddress  => "" . C4::Context->preference("KohaAdminEmailAddress"),
             AnonSuggestions =>  "" . C4::Context->preference("AnonSuggestions"),
             suggestion             => "" . C4::Context->preference("suggestion"),
+            OPACViewOthersSuggestions             => "" . C4::Context->preference("OPACViewOthersSuggestions"),
             virtualshelves         => "" . C4::Context->preference("virtualshelves"),
             OpacNav                => "" . C4::Context->preference("OpacNav"),
             opacheader             => "" . C4::Context->preference("opacheader"),
@@ -294,11 +296,16 @@ sub get_template_and_user {
             opaclargeimage         => "" . C4::Context->preference("opaclargeimage"),
             opaclayoutstylesheet   => "". C4::Context->preference("opaclayoutstylesheet"),
             opaccolorstylesheet    => "". C4::Context->preference("opaccolorstylesheet"),
+            OPACUserCSS    => "". C4::Context->preference("OPACUserCSS"),
             opaclanguagesdisplay   => "". C4::Context->preference("opaclanguagesdisplay"),
             opacuserlogin          => "" . C4::Context->preference("opacuserlogin"),
+                       OpacMainUserBlock =>  "" . C4::Context->preference("OpacMainUserBlock"),
+                       OPACURLOpenInNewWindow =>  "" . C4::Context->preference("OPACURLOpenInNewWindow"),
             opacbookbag            => "" . C4::Context->preference("opacbookbag"),
             TemplateEncoding       => "". C4::Context->preference("TemplateEncoding"),
             AmazonContent          => "" . C4::Context->preference("AmazonContent"),
+            OPACShelfBrowser       => "". C4::Context->preference("OPACShelfBrowser"),
+            OPACAmazonSimilarItems => "" . C4::Context->preference("OPACAmazonSimilarItems"),
             LibraryName            => "" . C4::Context->preference("LibraryName"),
             LibraryNameTitle       => "" . $LibraryNameTitle,
             LoginBranchcode        => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"),
@@ -313,13 +320,20 @@ sub get_template_and_user {
             OpacAuthorities        => C4::Context->preference("OpacAuthorities"),
             OpacBrowser            => C4::Context->preference("OpacBrowser"),
             RequestOnOpac          => C4::Context->preference("RequestOnOpac"),
+                       OPACItemHolds          => C4::Context->preference("OPACItemHolds"),
             reviewson              => C4::Context->preference("reviewson"),
             hide_marc              => C4::Context->preference("hide_marc"),
             patronimages           => C4::Context->preference("patronimages"),
+            hidelostitems          => C4::Context->preference("hidelostitems"),
             mylibraryfirst   => C4::Context->preference("SearchMyLibraryFirst"),
             "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
             OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"),
             'item-level_itypes' => C4::Context->preference('item-level_itypes'),
+            'Version' => C4::Context->preference('Version'),
+                       yuipath => C4::Context->preference("yuipath"),
+            singleBranchMode => C4::Context->preference("singleBranchMode"),
+            XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
+            XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
         );
     }
        $template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
@@ -412,8 +426,7 @@ sub _version_check ($$) {
     $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
     $debug and print STDERR "kohaversion : $kohaversion\n";
     if ($version < $kohaversion){
-        my $warning = "Database update needed, redirecting to %s. Database is $version and Koha is "
-            . C4::Context->config("kohaversion");
+        my $warning = "Database update needed, redirecting to %s. Database is $version and Koha is $kohaversion";
         if ($type ne 'opac'){
             warn sprintf($warning, 'Installer');
             print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3");
@@ -682,7 +695,7 @@ sub checkauth {
     # get the branchloop, which we need for authentication
     my $branches = GetBranches();
     my @branch_loop;
-    for my $branch_hash (keys %$branches) {
+    for my $branch_hash (sort keys %$branches) {
                push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
     }
 
@@ -696,6 +709,7 @@ sub checkauth {
         virtualshelves       => C4::Context->preference("virtualshelves"),
         opaclargeimage       => C4::Context->preference("opaclargeimage"),
         LibraryName          => C4::Context->preference("LibraryName"),
+        opacuserlogin        => C4::Context->preference("opacuserlogin"),
         OpacNav              => C4::Context->preference("OpacNav"),
         opaccredits          => C4::Context->preference("opaccredits"),
         opacreadinghistory   => C4::Context->preference("opacreadinghistory"),
@@ -704,6 +718,11 @@ sub checkauth {
         opaccolorstylesheet  => C4::Context->preference("opaccolorstylesheet"),
         opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"),
         opacuserjs           => C4::Context->preference("opacuserjs"),
+        opacbookbag          => "" . C4::Context->preference("opacbookbag"),
+        OpacCloud            => C4::Context->preference("OpacCloud"),
+        OpacTopissue         => C4::Context->preference("OpacTopissue"),
+        OpacAuthorities      => C4::Context->preference("OpacAuthorities"),
+        OpacBrowser          => C4::Context->preference("OpacBrowser"),
         intranetcolorstylesheet =>
                                                                C4::Context->preference("intranetcolorstylesheet"),
         intranetstylesheet => C4::Context->preference("intranetstylesheet"),