|
Line 0
Link Here
|
| 0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use Koha::Installer::Output qw(say_warning say_success say_info); |
| 3 |
|
| 4 |
return { |
| 5 |
bug_number => "39802", |
| 6 |
description => "Add LostChargesControl system preference", |
| 7 |
up => sub { |
| 8 |
my ($args) = @_; |
| 9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
| 10 |
|
| 11 |
# Get the existing value from the CircControl system preference |
| 12 |
my ($circcontrol) = $dbh->selectrow_array( |
| 13 |
q| |
| 14 |
SELECT value FROM systempreferences WHERE variable='CircControl'; |
| 15 |
| |
| 16 |
); |
| 17 |
$dbh->do( |
| 18 |
q{ |
| 19 |
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES |
| 20 |
('LostChargesControl',?,'PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the charges for items being marked lost','Choice') |
| 21 |
}, undef, $circcontrol |
| 22 |
); |
| 23 |
say $out "Added new system preference 'LostChargesControl'"; |
| 24 |
}, |
| 25 |
}; |