Bug 13436: (RM followup) university -> academic DB update

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2014-12-19 16:45:23 -03:00
parent 30e40bd884
commit 281b3225fc
2 changed files with 15 additions and 1 deletions

View File

@ -448,7 +448,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'),
('UsageStatsLastUpdateTime', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'),
('UsageStatsLibraryName', '', NULL, 'The library name to be shown on Hea Koha community website', 'Free'),
('UsageStatsLibraryType', 'public', 'public|university', 'The library type to be shown on the Hea Koha community website', 'Choice'),
('UsageStatsLibraryType', 'public', 'public|school|academic|research|private|societyAssociation|corporate|government|religiousOrg|subscription', 'The library type to be shown on the Hea Koha community website', 'Choice'),
('UsageStatsLibraryUrl', '', NULL, 'The library URL to be shown on Hea Koha community website', 'Free'),
('UseAuthoritiesForTracings','1','0','Use authority record numbers for subject tracings instead of heading strings.','YesNo'),
('UseBranchTransferLimits','0','','If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.','YesNo'),

View File

@ -9585,6 +9585,20 @@ if ( CheckVersion($DBversion) ) {
SetVersion ($DBversion);
}
$DBversion = "3.19.00.XXX";
if ( CheckVersion($DBversion) ) {
$dbh->do("
UPDATE systempreferences
SET options = 'public|school|academic|research|private|societyAssociation|corporate|government|religiousOrg|subscription'
WHERE variable = 'UsageStatsLibraryType'
");
if ( C4::Context->preference("UsageStatsLibraryType") eq "university" ) {
C4::Context->set_preference("UsageStatsLibraryType", "academic")
}
print "Upgrade to $DBversion done (Bug 13436: Add more options to UsageStatsLibraryType)\n";
SetVersion ($DBversion);
}
=head1 FUNCTIONS
=head2 TableExists($table)