2 if( CheckVersion( $DBversion ) ) {
5 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
6 VALUES ('SelfCheckInMainUserBlock', '', '70|10', 'Add a block of HTML that will display on the self check-in screen.', 'Textarea');
10 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
11 VALUES ('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo');
15 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
16 VALUES ('SelfCheckInModuleUserID', NULL, NULL, 'Patron ID (borrowernumber) to be allowed on the self-checkin module.', 'Integer');
20 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
21 VALUES ('SelfCheckInTimeout', 120, NULL, 'Define the number of seconds before the self check-in module times out.', 'Integer');
25 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
26 VALUES ('SelfCheckInUserCSS', '', NULL, 'Add CSS to be included in the self check-in module in an embedded <style> tag.', 'free');
30 INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
31 VALUES ('SelfCheckInUserJS', '', NULL, 'Define custom javascript for inclusion in the self check-in module.', 'free');
34 # Add new userflag for self check
36 INSERT IGNORE INTO userflags (bit,flag,flagdesc,defaulton) VALUES
37 (23,'self_check','Self check modules',0);
40 # Add self check-in module subpermission
42 INSERT IGNORE INTO permissions (module_bit,code,description)
43 VALUES (23, 'self_checkin_module', 'Log into the self check-in module');
46 # Add self check-in module subpermission
48 INSERT IGNORE INTO permissions (module_bit,code,description)
49 VALUES (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID');
52 # Update patrons with self_checkout permission
53 # IMPORTANT: Needs to happen before removing the old subpermission
55 UPDATE user_permissions
57 code = 'self_checkout_module'
58 WHERE module_bit = 1 AND code = 'self_checkout';
61 # Remove old self_checkout permission
63 DELETE IGNORE FROM permissions
64 WHERE code='self_checkout';
67 SetVersion( $DBversion );
68 print "Upgrade to $DBversion done (Bug 15492: Add a standalone self-checkin module)\n";