View | Details | Raw Unified | Return to bug 15326
Collapse All | Expand All

(-)a/opac/opac-page.pl (-1 / +6 lines)
Lines 36-43 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
36
my $page_id = $query->param('page_id');
36
my $page_id = $query->param('page_id');
37
my $page;
37
my $page;
38
38
39
my $homebranch = $ENV{OPAC_BRANCH_DEFAULT};
40
if (C4::Context->userenv) {
41
    $homebranch = C4::Context->userenv->{'branch'};
42
}
43
39
if (defined $page_id){
44
if (defined $page_id){
40
    $page = Koha::AdditionalContents->search({ idnew => $page_id, location => ['opac_only', 'staff_and_opac'] });
45
    $page = Koha::AdditionalContents->search({ idnew => $page_id, location => ['opac_only', 'staff_and_opac'], branchcode => [ $homebranch, undef ] });
41
    if ( $page->count > 0){
46
    if ( $page->count > 0){
42
        $template->param( page => $page->next );
47
        $template->param( page => $page->next );
43
    } else {
48
    } else {
(-)a/tools/page.pl (-3 / +3 lines)
Lines 28-34 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
28
        template_name   => "tools/page.tt",
28
        template_name   => "tools/page.tt",
29
        query           => $query,
29
        query           => $query,
30
        type            => "intranet",
30
        type            => "intranet",
31
        flagsrequired   => { tools => '*' },
31
        flagsrequired   => { catalogue => 1 },
32
    }
32
    }
33
);
33
);
34
34
Lines 36-42 my $page_id = $query->param('page_id'); Link Here
36
my $page;
36
my $page;
37
37
38
if (defined $page_id){
38
if (defined $page_id){
39
    $page = Koha::AdditionalContents->search({ idnew => $page_id, location => ['staff_only', 'staff_and_opac'] });
39
    my $branch = C4::Context->userenv->{'branch'};
40
    $page = Koha::AdditionalContents->search({ idnew => $page_id, location => ['staff_only', 'staff_and_opac'], branchcode => [ $branch, undef ] });
40
    if ( $page->count > 0){
41
    if ( $page->count > 0){
41
        $template->param( page => $page->next );
42
        $template->param( page => $page->next );
42
    } else {
43
    } else {
43
- 

Return to bug 15326