Bugzilla – Attachment 97187 Details for
Bug 24206
Change URLs for default options in OPACSearchForTitleIn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations
Bug-24206-Update-content-of-OpacSearchForTitleIn-f.patch (text/plain), 4.82 KB, created by
Jonathan Druart
on 2020-01-10 11:04:46 UTC
(
hide
)
Description:
Bug 24206: Update content of OpacSearchForTitleIn for existing installations
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-10 11:04:46 UTC
Size:
4.82 KB
patch
obsolete
>From 1d5565240b5f34421b2dba3224446a3909e05d3c Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 22 Dec 2019 13:07:46 +0000 >Subject: [PATCH] Bug 24206: Update content of OpacSearchForTitleIn for > existing installations > >This includes a database update for existing installations. >Using the REPLACE function it makes the same changes to the URLs >as the previous patch did for new installations: > >- Worldcat: now https >- BookFinder: now https >- OpenLibrary: remove / before search parameters > >To test: >- Verify the current content of your preference OpacSearchForTitleIn > (without changes from first patch!) >- Run the database update >- Verify everything still works, but changes have been made > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../mysql/atomicupdate/bug_24206_update_searchfortitlein.perl | 9 +++++++++ > installer/data/mysql/sysprefs.sql | 2 +- > 2 files changed, 10 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_24206_update_searchfortitlein.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24206_update_searchfortitlein.perl b/installer/data/mysql/atomicupdate/bug_24206_update_searchfortitlein.perl >new file mode 100644 >index 0000000000..46c26c2d49 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24206_update_searchfortitlein.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( 'UPDATE systempreferences SET value = REPLACE(value, "http://worldcat.org", "https://worldcat.org") WHERE variable = "OPACSearchForTitleIn"' ); >+ $dbh->do( 'UPDATE systempreferences SET value = REPLACE(value, "http://www.bookfinder.com", "https://www.bookfinder.com") WHERE variable = "OPACSearchForTitleIn"' ); >+ $dbh->do( 'UPDATE systempreferences SET value = REPLACE(value, "https://openlibrary.org/search/?", "https://openlibrary.org/search?") WHERE variable = "OPACSearchForTitleIn"' ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - Update OpacSearchForTitleIn system preference)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 10cafa3b3b..5a4fa4c3a9 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -423,7 +423,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'), > ('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'), > ('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'), >-('OPACSearchForTitleIn','<li><a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a></li>\n<li><a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a></li>\n<li><a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a></li>\n<li><a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a></li>','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'), >+('OPACSearchForTitleIn','<li><a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a></li>\n<li><a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a></li>\n<li><a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a></li>\n<li><a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a></li>','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'), > ('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'), > ('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'), > ('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'), >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24206
:
96569
|
96570
|
96673
|
96674
|
96675
|
96768
|
96769
|
97186
| 97187 |
97264
|
97265