Bugzilla – Attachment 138047 Details for
Bug 30678
Add OCLC_NO as option to OPACSearchForTitleIn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30678: Add OCLC_NO as option to OPACSearchForTitleIn
Bug-30678-Add-OCLCNO-as-option-to-OPACSearchForTit.patch (text/plain), 3.64 KB, created by
Kyle M Hall (khall)
on 2022-07-22 16:28:24 UTC
(
hide
)
Description:
Bug 30678: Add OCLC_NO as option to OPACSearchForTitleIn
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-07-22 16:28:24 UTC
Size:
3.64 KB
patch
obsolete
>From 370b11fc8496e695f056322495592a64bc753db3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 4 May 2022 14:30:28 +0000 >Subject: [PATCH] Bug 30678: Add OCLC_NO as option to OPACSearchForTitleIn > >We need to pass OCLC_NO as key to C4::Output::parametrized_url. >We get it from MARC21 035$a and strip the organizational code. > >Test plan: >Add e.g. 62385712 in 035$a in a record. >Add e.g. following link to pref OPACSearchForTitleIn: > <a href="https://worldcat.org/search?q={OCLC_NO}" target="_blank">WorldCat (via OCLC number)</a> >Open that record on detail page. Click More searches. Follow that link. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/opac-ISBDdetail.pl | 3 +++ > opac/opac-MARCdetail.pl | 3 +++ > opac/opac-detail.pl | 3 +++ > 3 files changed, 9 insertions(+) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 2d2355bb794..7707d45244b 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -201,6 +201,8 @@ my $issn = $marcissns->[0] || ''; > if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > $dat->{title} =~ s/\/+$//; # remove trailing slash > $dat->{title} =~ s/\s+$//; # remove trailing space >+ my $oclc_no = $record->subfield('035','a') // q{}; >+ $oclc_no =~ s/\([^)]*\)//; > $search_for_title = parametrized_url( > $search_for_title, > { >@@ -210,6 +212,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > ISSN => $issn, > CONTROLNUMBER => $marccontrolnumber, > BIBLIONUMBER => $biblionumber, >+ OCLC_NO => $oclc_no, > } > ); > $template->param('OPACSearchForTitleIn' => $search_for_title); >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index b4dae6d4ffd..d24ba791610 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -352,6 +352,8 @@ my $issn = $marcissns->[0] || ''; > if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > $dat->{title} =~ s/\/+$//; # remove trailing slash > $dat->{title} =~ s/\s+$//; # remove trailing space >+ my $oclc_no = $record->subfield('035','a') // q{}; >+ $oclc_no =~ s/\([^)]*\)//; > $search_for_title = parametrized_url( > $search_for_title, > { >@@ -361,6 +363,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > ISSN => $issn, > CONTROLNUMBER => $marccontrolnumber, > BIBLIONUMBER => $biblionumber, >+ OCLC_NO => $oclc_no, > } > ); > $template->param('OPACSearchForTitleIn' => $search_for_title); >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 65c6d0d624a..bf6d5b313e6 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -1186,6 +1186,8 @@ my $issn = $marcissns->[0] || ''; > if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > $dat->{title} =~ s/\/+$//; # remove trailing slash > $dat->{title} =~ s/\s+$//; # remove trailing space >+ my $oclc_no = $record->subfield('035','a') // q{}; >+ $oclc_no =~ s/\([^)]*\)//; > $search_for_title = parametrized_url( > $search_for_title, > { >@@ -1195,6 +1197,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > ISSN => $issn, > CONTROLNUMBER => $marccontrolnumber, > BIBLIONUMBER => $biblionumber, >+ OCLC_NO => $oclc_no, > } > ); > $template->param('OPACSearchForTitleIn' => $search_for_title); >-- >2.30.2
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 30678
:
134613
|
134614
|
134814
|
134815
|
134844
|
134845
|
134846
|
134847
|
136222
|
136223
|
136224
|
136225
|
138046
| 138047 |
138048
|
138049
|
138050