Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
[koha.git] / opac / opac-main.pl
index b0904c5..776ae72 100755 (executable)
@@ -51,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;
 
@@ -59,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);
 }