From 646321adb6b101e76cea7e37ee91a71ccf905c28 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. Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass --- .../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 67e2f42d71..eb6a4b3452 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -274,6 +274,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('EnableOpacSearchHistory','1'), ('EnablePointOfSale','0'), ('EnableSearchHistory','0'), +('EnableZotero','1'), ('EnhancedMessagingPreferences','1'), ('EnhancedMessagingPreferencesOPAC', '1'), ('ERMModule', '0'), 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 6a1de05b1c..05168fc32f 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 @@ -312,6 +312,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: