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

(-)a/C4/Circulation.pm (-1 / +5 lines)
Lines 136-142 System Pref options. Link Here
136
# FIXME -- these plugins should be moved out of Circulation.pm
136
# FIXME -- these plugins should be moved out of Circulation.pm
137
#
137
#
138
sub barcodedecode {
138
sub barcodedecode {
139
    my ($barcode, $filter) = @_;
139
    my ($barcode, $filter, $branch) = @_;
140
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
140
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
141
    $filter or return $barcode;     # ensure filter is defined, else return untouched barcode
141
    $filter or return $barcode;     # ensure filter is defined, else return untouched barcode
142
	if ($filter eq 'whitespace') {
142
	if ($filter eq 'whitespace') {
Lines 155-160 sub barcodedecode { Link Here
155
        # FIXME: $barcode could be "T1", causing warning: substr outside of string
155
        # FIXME: $barcode could be "T1", causing warning: substr outside of string
156
        # Why drop the nonzero digit after the T?
156
        # Why drop the nonzero digit after the T?
157
        # Why pass non-digits (or empty string) to "T%07d"?
157
        # Why pass non-digits (or empty string) to "T%07d"?
158
	} elsif ($filter eq 'libsuite8') {
159
		unless($barcode =~ m/^($branch)-/i){
160
		$barcode =~ s/^(\D+)[0]*(\d+)$/$branch-$1-$2/i
161
		}
158
	}
162
	}
159
    return $barcode;    # return barcode, modified or not
163
    return $barcode;    # return barcode, modified or not
160
}
164
}
(-)a/circ/circulation.pl (-2 / +2 lines)
Lines 115-122 if (C4::Context->preference("UseTablesortForCirc")) { Link Here
115
115
116
my $barcode        = $query->param('barcode') || '';
116
my $barcode        = $query->param('barcode') || '';
117
$barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
117
$barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
118
118
my $filter = C4::Context->preference('itemBarcodeInputFilter') || '';
119
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
119
$barcode = barcodedecode($barcode,$filter,$branch) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
120
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
120
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
121
my $duedatespec    = $query->param('duedatespec')   || $session->param('stickyduedate');
121
my $duedatespec    = $query->param('duedatespec')   || $session->param('stickyduedate');
122
my $issueconfirmed = $query->param('issueconfirmed');
122
my $issueconfirmed = $query->param('issueconfirmed');
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 145-151 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
145
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines).  Requires accruefines cronjob.','off|test|production','Choice');
145
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines).  Requires accruefines cronjob.','off|test|production','Choice');
146
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free');
146
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free');
147
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date.  Enter date according to the dateformat System Preference',NULL,'free');
147
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date.  Enter date according to the dateformat System Preference',NULL,'free');
148
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice');
148
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice');
149
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo');
149
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo');
150
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free');
150
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free');
151
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo');
151
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 731-737 $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,ty Link Here
731
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','The address to use for printing receipts, overdues, etc. if different than physical address',NULL,'free')");
731
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','The address to use for printing receipts, overdues, etc. if different than physical address',NULL,'free')");
732
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, test or production','test|production','Choice')");
732
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, test or production','test|production','Choice')");
733
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts',NULL,'free')");
733
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts',NULL,'free')");
734
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','cuecat','Choice')");
734
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','libsuite8','Choice')");
735
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo')");
735
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo')");
736
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free')");
736
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free')");
737
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACSubscriptionDisplay','economical','Specify how to display subscription information in the OPAC','economical|off|full','Choice')");
737
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACSubscriptionDisplay','economical','Specify how to display subscription information in the OPAC','economical|off|full','Choice')");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+1 lines)
Lines 14-19 Circulation: Link Here
14
                  whitespace: Remove spaces from
14
                  whitespace: Remove spaces from
15
                  cuecat: Convert from CueCat form
15
                  cuecat: Convert from CueCat form
16
                  T-prefix: Remove the first number from T-prefix style
16
                  T-prefix: Remove the first number from T-prefix style
17
                  libsuite8: Convert from Libsuite8 form
17
            - scanned patron barcodes.
18
            - scanned patron barcodes.
18
        -
19
        -
19
            - Sort previous checkouts on the circulation page from
20
            - Sort previous checkouts on the circulation page from
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl (-2 / +1 lines)
Lines 301-307 function refocus(calendar) { Link Here
301
        <!-- /TMPL_IF -->
301
        <!-- /TMPL_IF -->
302
302
303
        <!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
303
        <!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
304
            <li>The barcode was not found</li>
304
            <li>The barcode was not found <!-- TMPL_VAR NAME="barcode" --></li>
305
        <!-- /TMPL_IF -->
305
        <!-- /TMPL_IF -->
306
306
307
        <!-- TMPL_IF NAME="NOT_FOR_LOAN" -->
307
        <!-- TMPL_IF NAME="NOT_FOR_LOAN" -->
308
- 

Return to bug 5418