|
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 => "41624", |
| 6 |
description => "Remove SeparateHoldingsByGroup system preference", |
| 7 |
up => sub { |
| 8 |
my ($args) = @_; |
| 9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
| 10 |
|
| 11 |
# Check if the preference exists before removing |
| 12 |
my ($exists) = $dbh->selectrow_array( |
| 13 |
q{ |
| 14 |
SELECT COUNT(*) |
| 15 |
FROM systempreferences |
| 16 |
WHERE variable = 'SeparateHoldingsByGroup' |
| 17 |
} |
| 18 |
); |
| 19 |
|
| 20 |
if ($exists) { |
| 21 |
$dbh->do( |
| 22 |
q{ |
| 23 |
DELETE FROM systempreferences |
| 24 |
WHERE variable = 'SeparateHoldingsByGroup' |
| 25 |
} |
| 26 |
); |
| 27 |
} |
| 28 |
|
| 29 |
say_success( $out, "Removed system preference 'SeparateHoldingsByGroup'" ); |
| 30 |
}, |
| 31 |
}; |