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

(-)a/installer/data/mysql/updatedatabase.pl (-6 / +7 lines)
Lines 20885-20892 if( CheckVersion( $DBversion ) ) { Link Here
20885
        $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
20885
        $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
20886
    }
20886
    }
20887
20887
20888
    SetVersion( $DBversion );
20888
    NewVersion( $DBversion, 17702, 'Add column account_credit_types.archived');
20889
    print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n";
20890
}
20889
}
20891
20890
20892
$DBversion = '19.12.00.030';
20891
$DBversion = '19.12.00.030';
Lines 20907-20923 if( CheckVersion( $DBversion ) ) { Link Here
20907
    my ($opacheader) = $dbh->selectrow_array( q|
20906
    my ($opacheader) = $dbh->selectrow_array( q|
20908
        SELECT value FROM systempreferences WHERE variable='opacheader';
20907
        SELECT value FROM systempreferences WHERE variable='opacheader';
20909
    |);
20908
    |);
20909
20910
    my @detail;
20910
    if( $opacheader ){
20911
    if( $opacheader ){
20911
        foreach my $lang ( @langs ) {
20912
        foreach my $lang ( @langs ) {
20912
            print "Inserting opacheader contents into $lang news item...\n";
20913
            # If there is a value in the opacheader preference, insert it into opac_news
20913
            # If there is a value in the opacheader preference, insert it into opac_news
20914
            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader);
20914
            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader);
20915
            push @detail, "Inserted opacheader contents into $lang news item...\n";
20915
        }
20916
        }
20916
    }
20917
    }
20917
    # Remove the opacheader system preference
20918
    # Remove the opacheader system preference
20918
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'");
20919
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'");
20919
    SetVersion ($DBversion);
20920
20920
    print "Upgrade to $DBversion done (Bug 22880: Move contents of opacheader preference to Koha news system)\n";
20921
    unshift @detail, 'Move contents of opacheader preference to Koha news system';
20922
    NewVersion( $DBversion, 22880, \@detail);
20921
}
20923
}
20922
20924
20923
$DBversion = '19.12.00.031';
20925
$DBversion = '19.12.00.031';
20924
- 

Return to bug 24131