From 281b3225fcbafbb26568f57c2547c4fe13bde017 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 19 Dec 2014 16:45:23 -0300 Subject: [PATCH] Bug 13436: (RM followup) university -> academic DB update Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index c3e308f035..db9fd84505 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -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'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a0698efc68..2c3414853a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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) -- 2.39.5