[Koha-patches] [PATCH] bug 4312 change default for tagsmoderation to 0 from NULL
Nicole Engard
nengard at bywatersolutions.com
Wed Jun 23 09:50:34 CEST 2010
resending with fixes
---
installer/data/mysql/en/mandatory/sysprefs.sql | 2 +-
installer/data/mysql/updatedatabase.pl | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 49a02ea..8bfed37 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -204,7 +204,7 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES
('TagsExternalDictionary',NULL,'','Path on server to local ispell executable, used to set $Lingua::Ispell::path This dictionary is used as a \"whitelist\" of pre-allowed tags.',''),
('TagsInputOnDetail','1','','Allow users to input tags from the detail page.', 'YesNo'),
('TagsInputOnList', '0','','Allow users to input tags from the search results list.', 'YesNo'),
- ('TagsModeration', NULL,'','Require tags from patrons to be approved before becoming visible.','YesNo'),
+ ('TagsModeration', '0','','Require tags from patrons to be approved before becoming visible.','YesNo'),
('TagsShowOnDetail','10','','Number of tags to display on detail page. 0 is off.', 'Integer'),
('TagsShowOnList', '6','','Number of tags to display on search results list. 0 is off.','Integer');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index e9943a6..78f5622 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3655,6 +3655,13 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){
SetVersion ($DBversion);
}
+$DBversion = 'XXX';
+if (C4::Context->preference('Version') < TransformToNum($DBversion)){
+ $dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'TagsModeration' AND value is NULL");
+ print "Upgrade to $DBversion done (bug 4312 TagsModeration changed from NULL to 0)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
--
1.5.6.5
More information about the Koha-patches
mailing list