Bug 22880: (follow-up) Process all installed languages, not just enabled
This patch changes the database update so that the system preference is copied to news items in all installed languages, not just those enabled in the OPAC. Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
29bfa68800
commit
f3b87f37dd
|
|
@ -1,8 +1,17 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
my $opaclang = C4::Context->preference("opaclanguages");
|
||||
|
||||
# get list of installed translations
|
||||
use C4::Languages qw(getTranslatedLanguages);
|
||||
my @langs;
|
||||
push @langs, split ( '\,', $opaclang );
|
||||
my $tlangs = getTranslatedLanguages();
|
||||
|
||||
foreach my $language ( @$tlangs ) {
|
||||
foreach my $sublanguage ( @{$language->{'sublanguages_loop'}} ) {
|
||||
push @langs, $sublanguage->{'rfc4646_subtag'};
|
||||
}
|
||||
}
|
||||
|
||||
# Get any existing value from the opacheader system preference
|
||||
my ($opacheader) = $dbh->selectrow_array( q|
|
||||
SELECT value FROM systempreferences WHERE variable='opacheader';
|
||||
|
|
|
|||
Loading…
Reference in New Issue