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

(-)a/circ/circulation.pl (-1 / +7 lines)
Lines 43-49 use C4::Context; Link Here
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::AuthorisedValues;
45
use Koha::AuthorisedValues;
46
use Koha::Patron;
46
use Koha::Patrons;
47
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::Patron::Debarments qw(GetDebarments);
48
use Koha::DateUtils;
48
use Koha::DateUtils;
49
use Koha::Database;
49
use Koha::Database;
Lines 79-84 if (!C4::Context->userenv){ Link Here
79
    }
79
    }
80
}
80
}
81
81
82
if (C4::Context->preference("AutoSwitchPatron") ) {
83
    if (Koha::Patrons->search( { cardnumber => $query->param('barcode')} )->count() > 0) {
84
        print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$query->param('barcode'));
85
    }
86
}
87
82
my $barcodes = [];
88
my $barcodes = [];
83
my $barcode =  $query->param('barcode');
89
my $barcode =  $query->param('barcode');
84
# Barcode given by user could be '0'
90
# 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 65-70 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
65
('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'),
65
('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'),
66
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
66
('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
67
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
67
('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'),
68
('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'),
68
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
69
('Babeltheque','0','','Turn ON Babeltheque content  - See babeltheque.com to subscribe to this service','YesNo'),
69
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
70
('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
70
('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
71
('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