Lines 6446-6452
if ( CheckVersion($DBversion) ) {
Link Here
|
6446 |
|
6446 |
|
6447 |
$DBversion = "3.11.00.XXX"; |
6447 |
$DBversion = "3.11.00.XXX"; |
6448 |
if ( CheckVersion($DBversion) ) { |
6448 |
if ( CheckVersion($DBversion) ) { |
6449 |
$dbh->do("INSERT INTO permissions ( module_bit, code, description ) VALUES ( '1', 'overdues_report', 'Execute overdue items report' )"); |
6449 |
$dbh->do(q{ |
|
|
6450 |
INSERT INTO permissions ( module_bit, code, description ) |
6451 |
VALUES ( '1', 'overdues_report', 'Execute overdue items report' ) |
6452 |
}); |
6453 |
# add new permission for users with all report permissions and circulation remaining permission |
6454 |
my $sth = $dbh->prepare(q{ |
6455 |
INSERT INTO user_permissions (borrowernumber, module_bit, code) |
6456 |
SELECT user_permissions.borrowernumber, 1, 'overdues_report' |
6457 |
FROM user_permissions |
6458 |
LEFT JOIN borrowers USING(borrowernumber) |
6459 |
WHERE borrowers.flags & (1 << 16) |
6460 |
AND user_permissions.code = 'circulate_remaining_permissions' |
6461 |
}); |
6450 |
print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n"; |
6462 |
print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n"; |
6451 |
SetVersion($DBversion); |
6463 |
SetVersion($DBversion); |
6452 |
} |
6464 |
} |
6453 |
- |
|
|