From df5bfe1684896cf45df6f9c2fb3f60745f944461 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 24 Aug 2023 20:14:13 +0000 Subject: [PATCH] Bug 34584: (QA follow-up) Update system preference SocialNetworks SocialNetworks was set to be YesNo, but is actual choice with 3 options: linkedin, facebook, email. This updates the database and the sysprefs.sql file. It doesn't correct the value, but if it still contains twitter, this will be fixed by the next change of the pref and has no negative consequences. Signed-off-by: Katrin Fischer --- .../atomicupdate/bug_34584_remove_twitter.pl | 17 +++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_34584_remove_twitter.pl diff --git a/installer/data/mysql/atomicupdate/bug_34584_remove_twitter.pl b/installer/data/mysql/atomicupdate/bug_34584_remove_twitter.pl new file mode 100755 index 0000000000..60c6ba8879 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_34584_remove_twitter.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "34584", + description => "Update SocialNetworks system preference to Choice", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Do you stuffs here + $dbh->do( + q{UPDATE systempreferences SET type = "Choice", options = "facebook|linkedin|email" WHERE variable = "SocialNetworks"} + ); + + say $out "Updated system preference 'SocialNetworks'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 30197591a8..87610fdf15 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -680,7 +680,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'), ('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'), ('SMSSendUsername', '', '', 'Username/Login used to send SMS messages', 'free'), -('SocialNetworks','0','','Enable/Disable social networks links in opac detail pages','YesNo'), +('SocialNetworks','','facebook|linkedin|email','Enable/Disable social networks links in opac detail pages','Choice'), ('SpecifyDueDate','1','','Define whether to display \"Specify Due Date\" form in Circulation','YesNo'), ('SpecifyReturnDate',1,'','Define whether to display \"Specify Return Date\" form in Circulation','YesNo'), ('SpineLabelAutoPrint','0','','If this setting is turned on, a print dialog will automatically pop up for the quick spine label printer.','YesNo'), -- 2.30.2