Bugzilla – Attachment 30861 Details for
Bug 12695
Remove CGI::scrolling_list from marc21_linking_section.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12695: Remove CGI::scrolling_list from marc21_linking_section.pl
PASSED-QA-Bug-12695-Remove-CGIscrollinglist-from-m.patch (text/plain), 4.50 KB, created by
Katrin Fischer
on 2014-08-15 18:41:03 UTC
(
hide
)
Description:
[PASSED QA] Bug 12695: Remove CGI::scrolling_list from marc21_linking_section.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-08-15 18:41:03 UTC
Size:
4.50 KB
patch
obsolete
>From 5a57bc303abe436189ec08b7a0f26692d5f5ae38 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Fri, 1 Aug 2014 22:49:35 -0300 >Subject: [PATCH] [PASSED QA] Bug 12695: Remove CGI::scrolling_list from > marc21_linking_section.pl > >Same situation as Bug 12694. > >There are two instances on this file, but they are not used. >I suppose is old code that was left dangling. > >Both scrolling_list, CGIPublisher and CGIitemtype, are not >used on marc21_linking_section.tt nor any other file. > >Just removed from file two useless db queries. > >To test: >1. Apply the patch >2. Can't remember how to trigger this plugin. >You can edit you framework and change the plugin >for a tag, e.g. 007. Then save fw, search and edit a record, >clic to open plugin on 007 tag, check that works but don't >save the original record, finally revert your changes. > >There must be no functional changes, is unused code. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Followed test plan successfully. The behavior of the plugin window >appears to be unchanged after applying the patch. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Amending the test plan a bit: The plugin was added by bug 8185 >- not dead code at all :) > >In order to test: >- Edit one of your frameworks, make 773 atwxz9 visible. >- Link 773 $9 to the marc21-linking-section plugin >- Create a new record in cataloguing >- Search for a your host item record (parent) >- Link it >- Observe that the subfields have been filled with information > from the other record > $w = 001 from the parent > $9 = biblionumber from the parent > $t = Title > $x = ISSN > ... > >Still works with the patch applied. >--- > .../value_builder/marc21_linking_section.pl | 59 ++-------------------- > 1 file changed, 5 insertions(+), 54 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 514394f..baf0490 100644 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -335,62 +335,13 @@ sub plugin { > } > ); > >- my $sth = $dbh->prepare( >- "Select itemtype,description from itemtypes order by description"); >- $sth->execute; >- my @itemtype; >- my %itemtypes; >- push @itemtype, ""; >- $itemtypes{''} = ""; >- while ( my ( $value, $lib ) = $sth->fetchrow_array ) { >- push @itemtype, $value; >- $itemtypes{$value} = $lib; >- } >+ my @itemtypes = C4::ItemType->all; > >- my $CGIitemtype = CGI::scrolling_list( >- -name => 'value', >- -values => \@itemtype, >- -labels => \%itemtypes, >- -size => 1, >- -multiple => 0 >- ); >- $sth->finish; >- >- # To show list of branches please use GetBranchesLoop() and modify template >- >- my $req = $dbh->prepare( >-"select distinctrow left(publishercode,45) from biblioitems order by publishercode" >- ); >- $req->execute; >- my @select; >- push @select, ""; >- while ( my ($value) = $req->fetchrow ) { >- push @select, $value; >- } >- my $CGIpublisher = CGI::scrolling_list( >- -name => 'value', >- -id => 'publisher', >- -values => \@select, >- -size => 1, >- -multiple => 0 >- ); >- >-# my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description"); >-# $sth->execute; >-# while (my ($description,$itemtype) = $sth->fetchrow) { >-# $classlist.="<option value=\"$itemtype\">$description</option>\n"; >-# } >-# $sth->finish; >- >- my @itemtypes = C4::ItemType->all; >- >- $template->param( #classlist => $classlist, >- CGIitemtype => $CGIitemtype, >- CGIPublisher => $CGIpublisher, >- itypeloop => \@itemtypes, >- index => $query->param('index'), >+ $template->param( >+ itypeloop => \@itemtypes, >+ index => $query->param('index'), > Search => 1, >- ); >+ ); > } > output_html_with_http_headers $query, $cookie, $template->output; > } >-- >1.9.1
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 12695
:
30476
|
30771
| 30861