From cfb61c76b82c4a98b9b245d8865f5b1e9abe747e Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Wed, 23 Jun 2010 03:50:34 -0400 Subject: [PATCH] bug 4312 change default for tagsmoderation to 0 from NULL resending with fixes Signed-off-by: Galen Charlton --- installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 49a02ea459..8bfed37a48 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 e9943a662b..78f56221a9 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) -- 2.39.5