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

(-)a/C4/Auth.pm (-7 / +1 lines)
Lines 934-950 sub checkauth { Link Here
934
        my $value = $query->param($name);
934
        my $value = $query->param($name);
935
        push @inputs, { name => $name, value => $value };
935
        push @inputs, { name => $name, value => $value };
936
    }
936
    }
937
    # get the branchloop, which we need for authentication
938
    my $branches = GetBranches();
939
    my @branch_loop;
940
    for my $branch_hash (sort keys %$branches) {
941
		push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
942
    }
943
937
944
    my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
938
    my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
945
    my $template = C4::Templates::gettemplate($template_name, $type, $query );
939
    my $template = C4::Templates::gettemplate($template_name, $type, $query );
946
    $template->param(
940
    $template->param(
947
        branchloop           => \@branch_loop,
941
        branchloop           => GetBranchesLoop(),
948
        opaccolorstylesheet  => C4::Context->preference("opaccolorstylesheet"),
942
        opaccolorstylesheet  => C4::Context->preference("opaccolorstylesheet"),
949
        opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
943
        opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
950
        login                => 1,
944
        login                => 1,
(-)a/C4/Branch.pm (-5 / +5 lines)
Lines 160-170 sub GetBranchesLoop { # since this is what most pages want anyway Link Here
160
    my $onlymine = @_ ? shift : onlymine();
160
    my $onlymine = @_ ? shift : onlymine();
161
    my $branches = GetBranches($onlymine);
161
    my $branches = GetBranches($onlymine);
162
    my @loop;
162
    my @loop;
163
    foreach ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
163
    foreach my $branchcode ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
164
        push @loop, {
164
        push @loop, {
165
            value => $_,
165
            value      => $branchcode,
166
            selected => ($_ eq $branch) ? 1 : 0, 
166
            branchcode => $branchcode,
167
            branchname => $branches->{$_}->{branchname},
167
            selected   => ($branchcode eq $branch) ? 1 : 0,
168
            branchname => $branches->{$branchcode}->{branchname},
168
        };
169
        };
169
    }
170
    }
170
    return \@loop;
171
    return \@loop;
171
- 

Return to bug 5634