}
}
+if (C4::Context->preference("AutoSwitchPatron") ) {
+ if (Koha::Patrons->search( { cardnumber => $query->param('barcode')} )->count() > 0) {
+ print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$query->param('barcode'));
+ }
+}
+
my $barcodes = [];
my $barcode = $query->param('barcode');
# Barcode given by user could be '0'
--- /dev/null
+INSERT INTO systempreferences (variable,value,options,explanation,type)
+VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo');
('AutoSelfCheckAllowed','0','','For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.','YesNo'),
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
+('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'),
('Babeltheque','0','','Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','YesNo'),
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),