1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3 my $opaclang = C4::Context->preference("opaclanguages");
5 push @langs, split ( '\,', $opaclang );
6 # Get any existing value from the OpacNavRight system preference
7 my ($OpacNavRight) = $dbh->selectrow_array( q|
8 SELECT value FROM systempreferences WHERE variable='OpacNavRight';
11 # If there is a value in the OpacNavRight preference, insert it into opac_news
12 $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, 'OpacNavRight_$langs[0]', '', '$OpacNavRight')");
14 # Remove the OpacNavRight system preference
15 $dbh->do("DELETE FROM systempreferences WHERE variable='OpacNavRight'");
16 SetVersion ($DBversion);
17 print "Upgrade to $DBversion done (Bug 22318: Move contents of OpacNavRight preference to Koha news system)\n";