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

(-)a/C4/Auth.pm (-10 / +8 lines)
Lines 450-463 sub get_template_and_user { Link Here
450
450
451
    # these template parameters are set the same regardless of $in->{'type'}
451
    # these template parameters are set the same regardless of $in->{'type'}
452
452
453
    # Decide if the patron can make suggestions in the OPAC
454
    my $can_make_suggestions;
455
    if ( C4::Context->preference('Suggestion') && C4::Context->preference('AnonSuggestions') ) {
456
        $can_make_suggestions = 1;
457
    } elsif ( C4::Context->userenv && C4::Context->userenv->{'number'} ) {
458
        $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions;
459
    }
460
461
    my $minPasswordLength = C4::Context->preference('minPasswordLength');
453
    my $minPasswordLength = C4::Context->preference('minPasswordLength');
462
    $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3;
454
    $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3;
463
    $template->param(
455
    $template->param(
Lines 496-502 sub get_template_and_user { Link Here
496
            intranetstylesheet                                                         => C4::Context->preference("intranetstylesheet"),
488
            intranetstylesheet                                                         => C4::Context->preference("intranetstylesheet"),
497
            IntranetUserCSS                                                            => C4::Context->preference("IntranetUserCSS"),
489
            IntranetUserCSS                                                            => C4::Context->preference("IntranetUserCSS"),
498
            IntranetUserJS                                                             => C4::Context->preference("IntranetUserJS"),
490
            IntranetUserJS                                                             => C4::Context->preference("IntranetUserJS"),
499
            suggestion                                                                 => $can_make_suggestions,
500
            virtualshelves                                                             => C4::Context->preference("virtualshelves"),
491
            virtualshelves                                                             => C4::Context->preference("virtualshelves"),
501
            StaffSerialIssueDisplayCount                                               => C4::Context->preference("StaffSerialIssueDisplayCount"),
492
            StaffSerialIssueDisplayCount                                               => C4::Context->preference("StaffSerialIssueDisplayCount"),
502
            EasyAnalyticalRecords                                                      => C4::Context->preference('EasyAnalyticalRecords'),
493
            EasyAnalyticalRecords                                                      => C4::Context->preference('EasyAnalyticalRecords'),
Lines 550-555 sub get_template_and_user { Link Here
550
            $opac_name = C4::Context->userenv->{'branch'};
541
            $opac_name = C4::Context->userenv->{'branch'};
551
        }
542
        }
552
543
544
        # Decide if the patron can make suggestions in the OPAC
545
        my $can_make_suggestions;
546
        if ( C4::Context->preference('Suggestion') && C4::Context->preference('AnonSuggestions') ) {
547
            $can_make_suggestions = 1;
548
        } elsif ( C4::Context->userenv && C4::Context->userenv->{'number'} ) {
549
            $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions;
550
        }
551
553
        my @search_groups = Koha::Library::Groups->get_search_groups({ interface => 'opac' })->as_list;
552
        my @search_groups = Koha::Library::Groups->get_search_groups({ interface => 'opac' })->as_list;
554
        $template->param(
553
        $template->param(
555
            AnonSuggestions                       => "" . C4::Context->preference("AnonSuggestions"),
554
            AnonSuggestions                       => "" . C4::Context->preference("AnonSuggestions"),
556
- 

Return to bug 33663