View | Details | Raw Unified | Return to bug 22880
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl (-3 / +11 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    my $opaclang = C4::Context->preference("opaclanguages");
3
4
    # get list of installed translations
5
    use C4::Languages qw(getTranslatedLanguages);
4
    my @langs;
6
    my @langs;
5
    push @langs, split ( '\,', $opaclang );
7
    my $tlangs = getTranslatedLanguages();
8
9
    foreach my $language ( @$tlangs ) {
10
        foreach my $sublanguage ( @{$language->{'sublanguages_loop'}} ) {
11
            push @langs, $sublanguage->{'rfc4646_subtag'};
12
        }
13
    }
14
6
    # Get any existing value from the opacheader system preference
15
    # Get any existing value from the opacheader system preference
7
    my ($opacheader) = $dbh->selectrow_array( q|
16
    my ($opacheader) = $dbh->selectrow_array( q|
8
        SELECT value FROM systempreferences WHERE variable='opacheader';
17
        SELECT value FROM systempreferences WHERE variable='opacheader';
9
- 

Return to bug 22880