From 747b41bec9c13f4fb4ef0f1f4c8a0d0c3ddeacb2 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Tue, 22 Jun 2010 17:48:14 -0400 Subject: [PATCH] bug 4312 change default for tagsmoderation to 0 from NULL Content-Type: text/plain; charset="utf-8" --- 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..05ab550 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 = 'NULL'"); + print "Upgrade to $DBversion done (bug 4312 TagsModeration changed from NULL to 0)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) -- 1.5.6.5