From 81ecb093d8a158d31f71a8b91cb1492dad0045bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Tue, 30 Dec 2025 10:03:26 -0300 Subject: [PATCH] Bug 41084: Add EnableZotero system preference This system preference will be used to enable opac-export.pl?format=utf8 regardless of the OpacExportOptions values, specifically for Zotero integration support. --- .../data/mysql/atomicupdate/bug_41084.pl | 19 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/opac.pref | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_41084.pl diff --git a/installer/data/mysql/atomicupdate/bug_41084.pl b/installer/data/mysql/atomicupdate/bug_41084.pl new file mode 100755 index 0000000000..c41673918a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41084.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "41084", + description => "Add EnableZotero system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('EnableZotero','1','','Enable Zotero export functionality','YesNo') + } + ); + + say $out "Added new system preference 'EnableZotero'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 35a5d15dd8..52f09ac80c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -263,6 +263,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''), ('EnablePointOfSale','0',NULL,'Enable the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)','YesNo'), ('EnableSearchHistory','0','','Enable or disable search history','YesNo'), +('EnableZotero','1','','Enable Zotero export functionality','YesNo'), ('EnhancedMessagingPreferences','1','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'), ('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'), ('ERMModule', '0', NULL, 'Enable the e-resource management module', 'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 37202dc17c..7d4df0be2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -306,6 +306,12 @@ OPAC: mods: MODS ris: RIS isbd: ISBD + - + - pref: EnableZotero + choices: + 1: Enable + 0: "Don't enable" + - 'Zotero export functionality (UTF-8 encoded MARC). The export option will not be displayed in the OPAC unless the OpacExportOptions has it enabled.' - - pref: OpacSeparateHoldings choices: -- 2.50.1 (Apple Git-155)