|
Lines 8085-8096
if ( CheckVersion($DBversion) ) {
Link Here
|
| 8085 |
|
8085 |
|
| 8086 |
$DBversion = "XXX"; |
8086 |
$DBversion = "XXX"; |
| 8087 |
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { |
8087 |
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { |
| 8088 |
$dbh->do(" |
8088 |
$dbh->do(q{ |
| 8089 |
INSERT IGNORE INTO permissions (module_bit, code, description) |
8089 |
INSERT IGNORE INTO permissions (module_bit, code, description) |
| 8090 |
VALUES (11, 'order_claim_for_all', 'Claim for all orders') |
8090 |
VALUES (11, 'order_claim_for_all', 'Claim for all orders') |
| 8091 |
"); |
8091 |
}); |
|
|
8092 |
|
| 8093 |
# Add this new permission to all users that have 'order_receive' permission |
| 8094 |
$dbh->do(q{ |
| 8095 |
INSERT INTO user_permissions (borrowernumber, module_bit, code) |
| 8096 |
SELECT borrowernumber, 11, 'order_claim_for_all' |
| 8097 |
FROM user_permissions |
| 8098 |
WHERE code = 'order_receive' |
| 8099 |
GROUP BY borrowernumber |
| 8100 |
}); |
| 8092 |
|
8101 |
|
| 8093 |
print "Upgrade to $DBversion done (Add permission order_claim_for_all)\n"; |
8102 |
print "Upgrade to $DBversion done (Bug 7292: Add permission order_claim_for_all)\n"; |
| 8094 |
SetVersion($DBversion); |
8103 |
SetVersion($DBversion); |
| 8095 |
} |
8104 |
} |
| 8096 |
|
8105 |
|
| 8097 |
- |
|
|