5 description => "Move OpacMoreSearches to additional contents",
8 my ($dbh, $out) = @$args{qw(dbh out)};
9 # Get any existing value from the OpacMoreSearches system preference
10 my ( $opacmoresearches ) = $dbh->selectrow_array(q{
11 SELECT value FROM systempreferences WHERE variable='OpacMoreSearches'
13 if( $opacmoresearches ){
14 # Insert any values found from system preference into additional_contents
16 INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on )
17 VALUES ('html_customizations', 'OpacMoreSearches', 'OpacMoreSearches', NULL, ?, ?, ?, CAST(NOW() AS date) )
18 }, undef, "OpacMoreSearches default", $opacmoresearches, 'default');
19 # Remove old system preference
21 DELETE FROM systempreferences WHERE variable='OpacMoreSearches'
24 say $out "No OpacMoreSearches preference found. Value was empty or update has already been run.";