From e8011cadddeedd594ba7fbbf90a49ce1822afa18 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 16 Mar 2019 13:19:11 +0100 Subject: [PATCH] Bug 8701: Remove links to OpacHiddenItems.txt in favor of wiki page Removes the OpacHiddenItems.txt file from Koha as this is not accessible for most people and replaces it with links to the wiki page like it's already done from the system preference editor. For reporting and the initial patch Thanks-to: Jane Sandberg To test: - Changes are invisible from the GUI - Apply patch and run database update - SELECT * FROM systempreferences WHERE variable = "OpacHiddenItems"; - Verify the description has the wiki link - Verify that docs/opac/OpacHiddenItems.txt has been removed Signed-off-by: Hayley Mapley Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- docs/opac/OpacHiddenItems.txt | 12 ------------ .../mysql/atomicupdate/bug_8701_opachiddenitems.perl | 6 ++++++ installer/data/mysql/sysprefs.sql | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 docs/opac/OpacHiddenItems.txt create mode 100644 installer/data/mysql/atomicupdate/bug_8701_opachiddenitems.perl diff --git a/docs/opac/OpacHiddenItems.txt b/docs/opac/OpacHiddenItems.txt deleted file mode 100644 index d46f94b114..0000000000 --- a/docs/opac/OpacHiddenItems.txt +++ /dev/null @@ -1,12 +0,0 @@ -The OpacHiddenItems syspref allow the user to define custom rules -for hiding specific items at opac. - -YAML syntax is used for defining such rules. - -Items can be hidden according to values from the items table: - -field: [value1, value2, ...] - -Example : -withdrawn: [0, 1] -homebranch: [homebranch1, homebranch2] diff --git a/installer/data/mysql/atomicupdate/bug_8701_opachiddenitems.perl b/installer/data/mysql/atomicupdate/bug_8701_opachiddenitems.perl new file mode 100644 index 0000000000..f6a60ac4c7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_8701_opachiddenitems.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE systempreferences SET explanation = 'This syspref allows to define custom rules for hiding specific items at the OPAC. See http://wiki.koha-community.org/wiki/OpacHiddenItems for more information.' WHERE variable = 'OpacHiddenItems'"); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 8701 - Update OpacHiddenItems system preference description)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 91fee6f7ed..2e8f2a45cd 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -365,7 +365,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACFinesTab','1','','If OFF the patron fines tab in the OPAC is disabled.','YesNo'), ('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), ('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'), -('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'), +('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at the OPAC. See http://wiki.koha-community.org/wiki/OpacHiddenItems for more information.','Textarea'), ('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by |, that can see items otherwise hidden by OpacHiddenItems','Textarea'), ('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'), ('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'), -- 2.39.5