Lines 51-58
my $homebranch;
Link Here
|
51 |
if (C4::Context->userenv) { |
51 |
if (C4::Context->userenv) { |
52 |
$homebranch = C4::Context->userenv->{'branch'}; |
52 |
$homebranch = C4::Context->userenv->{'branch'}; |
53 |
} |
53 |
} |
54 |
my $all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); |
54 |
|
55 |
my $koha_news_count = scalar @$all_koha_news; |
55 |
my $news_id = $input->param('news_news_id'); |
|
|
56 |
my ($all_koha_news, $koha_news_count); |
57 |
if (defined $news_id && length $news_id) { |
58 |
$all_koha_news = [ get_opac_new($news_id) ]; |
59 |
$koha_news_count = 1; |
60 |
} else { |
61 |
$all_koha_news = GetNewsToDisplay($news_lang, $homebranch); |
62 |
$koha_news_count = scalar @$all_koha_news; |
63 |
} |
56 |
|
64 |
|
57 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
65 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
58 |
|
66 |
|
59 |
- |
|
|