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

(-)a/circ/circulation.pl (-1 / +7 lines)
Lines 42-48 use Koha::Holds; Link Here
42
use C4::Context;
42
use C4::Context;
43
use CGI::Session;
43
use CGI::Session;
44
use C4::Members::Attributes qw(GetBorrowerAttributes);
44
use C4::Members::Attributes qw(GetBorrowerAttributes);
45
use Koha::Patron;
45
use Koha::Patrons;
46
use Koha::Patron::Debarments qw(GetDebarments);
46
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::DateUtils;
47
use Koha::DateUtils;
48
use Koha::Database;
48
use Koha::Database;
Lines 77-82 if (!C4::Context->userenv){ Link Here
77
    }
77
    }
78
}
78
}
79
79
80
if (C4::Context->preference("AutoSwitchPatron") ) {
81
    if (Koha::Patrons->search( { cardnumber => $query->param('barcode')} )->count() > 0) {
82
        print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$query->param('barcode'));
83
    }
84
}
85
80
my $barcodes = [];
86
my $barcodes = [];
81
my $barcode =  $query->param('barcode');
87
my $barcode =  $query->param('barcode');
82
# Barcode given by user could be '0'
88
# Barcode given by user could be '0'
(-)a/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql (+2 lines)
Line 0 Link Here
1
INSERT INTO systempreferences (variable,value,options,explanation,type)
2
VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 59-64 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
59
('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'),
59
('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'),
60
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
60
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
61
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
61
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
62
('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'),
62
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
63
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
63
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
64
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
64
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
65
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +7 lines)
Lines 2-7 Circulation: Link Here
2
# FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring.
2
# FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring.
3
    Interface:
3
    Interface:
4
        -
4
        -
5
            - pref: AutoSwitchPatron
6
              choices:
7
                  yes: "Enable"
8
                  no: "Don't enable"
9
            - the automatic redirection to another patron when a patron barcode is scanned instead of a book.
10
            - This should not be enabled if you have overlapping patron and book barcodes.
11
        -
5
            - pref: CircAutocompl
12
            - pref: CircAutocompl
6
              choices:
13
              choices:
7
                  yes: Try
14
                  yes: Try
8
- 

Return to bug 15752