Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
[koha.git] / opac / opac-main.pl
index 9db64cb..776ae72 100755 (executable)
@@ -35,7 +35,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         type            => "opac",
         query           => $input,
         authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
-        flagsrequired   => { borrow => 1 },
     }
 );
 
@@ -52,6 +51,9 @@ my $homebranch;
 if (C4::Context->userenv) {
     $homebranch = C4::Context->userenv->{'branch'};
 }
+if (defined $input->param('branch') and length $input->param('branch')) {
+    $homebranch = $input->param('branch');
+}
 my $all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);
 my $koha_news_count = scalar @$all_koha_news;
 
@@ -60,11 +62,12 @@ my $quote = GetDailyQuote();   # other options are to pass in an exact quote id
 $template->param(
     koha_news           => $all_koha_news,
     koha_news_count     => $koha_news_count,
+    branchcode          => $homebranch,
     display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
     daily_quote         => $quote,
 );
 
-# If GoogleIndicTransliteration system preference is On Set paramter to load Google's javascript in OPAC search screens
+# If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens
 if (C4::Context->preference('GoogleIndicTransliteration')) {
         $template->param('GoogleIndicTransliteration' => 1);
 }