Bug 8701: Remove links to OpacHiddenItems.txt in favor of wiki page
authorKatrin Fischer <katrin.fischer.83@web.de>
Sat, 16 Mar 2019 12:19:11 +0000 (13:19 +0100)
committerroot <root@f1ebe1bec408>
Thu, 18 Apr 2019 09:58:36 +0000 (09:58 +0000)
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 <sandbej@linnbenton.edu>

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 <hayleymapley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

docs/opac/OpacHiddenItems.txt [deleted file]
installer/data/mysql/atomicupdate/bug_8701_opachiddenitems.perl [new file with mode: 0644]
installer/data/mysql/sysprefs.sql

diff --git a/docs/opac/OpacHiddenItems.txt b/docs/opac/OpacHiddenItems.txt
deleted file mode 100644 (file)
index d46f94b..0000000
+++ /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 (file)
index 0000000..f6a60ac
--- /dev/null
@@ -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";
+}
index 91fee6f..2e8f2a4 100644 (file)
@@ -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'),