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

(-)a/circ/circulation.pl (-6 / +8 lines)
Lines 84-95 if (!C4::Context->userenv){ Link Here
84
84
85
my $barcodes = [];
85
my $barcodes = [];
86
my $barcode =  $query->param('barcode');
86
my $barcode =  $query->param('barcode');
87
my $findborrower;
88
my $autoswitched;
87
89
88
if (C4::Context->preference("AutoSwitchPatron") && $barcode) {
90
if (C4::Context->preference("AutoSwitchPatron") && $barcode) {
89
    if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) {
91
    if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) {
90
        print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$barcode&autoswitched=1");
92
        $findborrower = $barcode;
93
        undef $barcode;
94
        $autoswitched = 1;
91
    }
95
    }
92
}
96
}
97
$findborrower ||= $query->param('findborrower') || q{};
98
$findborrower =~ s|,| |g;
93
99
94
# Barcode given by user could be '0'
100
# Barcode given by user could be '0'
95
if ( $barcode || ( defined($barcode) && $barcode eq '0' ) ) {
101
if ( $barcode || ( defined($barcode) && $barcode eq '0' ) ) {
Lines 154-162 for (@failedreturns) { $return_failed{$_} = 1; } Link Here
154
160
155
my $searchtype = $query->param('searchtype') || q{contain};
161
my $searchtype = $query->param('searchtype') || q{contain};
156
162
157
my $findborrower = $query->param('findborrower') || q{};
158
$findborrower =~ s|,| |g;
159
160
my $branch = C4::Context->userenv->{'branch'};
163
my $branch = C4::Context->userenv->{'branch'};
161
164
162
if (C4::Context->preference("DisplayClearScreenButton")) {
165
if (C4::Context->preference("DisplayClearScreenButton")) {
Lines 665-671 $template->param( Link Here
665
    has_modifications         => $has_modifications,
668
    has_modifications         => $has_modifications,
666
    override_high_holds       => $override_high_holds,
669
    override_high_holds       => $override_high_holds,
667
    nopermission              => scalar $query->param('nopermission'),
670
    nopermission              => scalar $query->param('nopermission'),
668
    autoswitched              => $query->param("autoswitched"),
671
    autoswitched              => $autoswitched,
669
);
672
);
670
673
671
output_html_with_http_headers $query, $cookie, $template->output;
674
output_html_with_http_headers $query, $cookie, $template->output;
672
- 

Return to bug 15752