5 description => "Move contents of OpacNavBottom system preference into additional contents",
8 my ($dbh, $out) = @$args{qw(dbh out)};
10 # Get any existing value from the OpacNavBottom system preference
11 my ($opacnavbottom) = $dbh->selectrow_array( q|
12 SELECT value FROM systempreferences WHERE variable='OpacNavBottom';
15 # If there is a value in the OpacNavBottom preference, insert it into additional_contents
16 foreach my $lang ( 'default' ) {
17 say $out "Inserting OpacNavBottom contents into default";
18 $dbh->do( "INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'OpacNavBottom', 'OpacNavBottom', NULL, ?, ?, ?, CAST(NOW() AS date) )", undef, "OpacNavBottom $lang", $opacnavbottom, $lang );
21 # Remove the OpacNavBottom system preference
22 $dbh->do("DELETE FROM systempreferences WHERE variable='OpacNavBottom'");
23 say $out "Bug 24223 update done";
25 say $out "No OpacNavBottom preference found. Update has already been run.";