5 description => "Convert OpacMaintenanceNotice system preference to additional contents",
8 my ( $dbh, $out ) = @$args{qw(dbh out)};
10 # Get any existing value from the OpacMaintenanceNotice system preference
11 my ($opacmaintenancenotice) = $dbh->selectrow_array(
13 SELECT value FROM systempreferences WHERE variable='OpacMaintenanceNotice';
16 if ($opacmaintenancenotice) {
18 # Insert any values found from system preference into additional_contents
20 "INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'OpacMaintenanceNotice', 'OpacMaintenanceNotice', NULL, 'OpacMaintenanceNotice default', ?, 'default', CAST(NOW() AS date) )",
21 undef, $opacmaintenancenotice
24 # Remove old system preference
25 $dbh->do("DELETE FROM systempreferences WHERE variable='OpacMaintenanceNotice'");
26 say $out "Bug 23798 update done";