Bugzilla – Attachment 19960 Details for
Bug 10096
Add a Z39.50 interface for authority searching
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA
Bug-10096-FOLLOW-UP---fix-tabswhitespace-errors-to.patch (text/plain), 11.70 KB, created by
David Cook
on 2013-07-26 06:01:46 UTC
(
hide
)
Description:
Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA
Filename:
MIME Type:
Creator:
David Cook
Created:
2013-07-26 06:01:46 UTC
Size:
11.70 KB
patch
obsolete
>From 41d3d5314e4e894c6865a973606b21cbf9279c49 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Mon, 10 Jun 2013 14:06:43 +1200 >Subject: [PATCH] Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass > QA > >--- > C4/Breeding.pm | 4 +- > admin/z3950servers.pl | 105 ++++++++++---------- > cataloguing/z3950_auth_search.pl | 2 +- > .../prog/en/modules/admin/z3950servers.tt | 12 ++- > .../en/modules/cataloguing/z3950_auth_search.tt | 8 +- > 5 files changed, 68 insertions(+), 63 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 72f1e85..876ea19 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -455,9 +455,9 @@ sub _isbn_replace { > > =head2 ImportBreedingAuth > >- ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type); >+ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type); > >- TODO description >+TODO description > > =cut > >diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl >index c1e657c..51de4ca 100755 >--- a/admin/z3950servers.pl >+++ b/admin/z3950servers.pl >@@ -85,24 +85,27 @@ $template->param(script_name => $script_name, > > ################## ADD_FORM ################################## > # called by default. Used to create form to add or modify a record >-if ($op eq 'add_form') { >- $template->param(add_form => 1); >- #---- if primkey exists, it's a modify action, so read values to modify... >- my $data; >- if ($searchfield) { >- my $dbh = C4::Context->dbh; >- my $sth=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name"); >- $sth->execute($searchfield); >- $data=$sth->fetchrow_hashref; >- $sth->finish; >- } >- $template->param( $_ => $data->{$_} ) >- for ( qw( host port db userid password checked rank timeout encoding ) ); >- $template->param( $_ . $data->{$_} => 1) >- for ( qw( syntax recordtype ) ); >- # END $OP eq ADD_FORM >+if ( $op eq 'add_form' ) { >+ $template->param( add_form => 1 ); >+ >+ #---- if primkey exists, it's a modify action, so read values to modify... >+ my $data; >+ if ($searchfield) { >+ my $dbh = C4::Context->dbh; >+ my $sth = $dbh->prepare( >+"select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name" >+ ); >+ $sth->execute($searchfield); >+ $data = $sth->fetchrow_hashref; >+ $sth->finish; >+ } >+ $template->param( $_ => $data->{$_} ) >+ for (qw( host port db userid password checked rank timeout encoding )); >+ $template->param( $_ . $data->{$_} => 1 ) for (qw( syntax recordtype )); >+ >+ # END $OP eq ADD_FORM > ################## ADD_VALIDATE ################################## >-# called by add_form, used to insert/modify data in DB >+ # called by add_form, used to insert/modify data in DB > } elsif ($op eq 'add_validate') { > my $dbh=C4::Context->dbh; > my $sth=$dbh->prepare("select * from z3950servers where name=?"); >@@ -133,43 +136,43 @@ if ($op eq 'add_form') { > "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " . > "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ); > $sth->execute( >- $input->param( 'host' ), >- $input->param( 'port' ), >- $input->param( 'db' ), >- $input->param( 'userid' ), >- $input->param( 'password' ), >- $input->param( 'searchfield' ), >- $checked, >- $input->param( 'rank' ), >- $input->param( 'syntax' ), >- $input->param( 'encoding' ), >- $input->param( 'timeout' ), >- $input->param( 'recordtype' ) ); >- } >- $sth->finish; >- # END $OP eq ADD_VALIDATE >+ $input->param('host'), $input->param('port'), >+ $input->param('db'), $input->param('userid'), >+ $input->param('password'), $input->param('searchfield'), >+ $checked, $input->param('rank'), >+ $input->param('syntax'), $input->param('encoding'), >+ $input->param('timeout'), $input->param('recordtype') >+ ); >+ } >+ $sth->finish; >+ >+ # END $OP eq ADD_VALIDATE > ################## DELETE_CONFIRM ################################## > # called by default form, used to confirm deletion of data in DB > } elsif ($op eq 'delete_confirm') { >- $template->param(delete_confirm => 1); >- my $dbh = C4::Context->dbh; >- >- my $sth2=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name"); >- $sth2->execute($searchfield); >- my $data=$sth2->fetchrow_hashref; >- $sth2->finish; >- >- $template->param(host => $data->{'host'}, >- port => $data->{'port'}, >- db => $data->{'db'}, >- userid => $data->{'userid'}, >- password => $data->{'password'}, >- checked => $data->{'checked'}, >- rank => $data->{'rank'}, >- syntax => $data->{'syntax'}, >- timeout => $data->{'timeout'}, >- recordtype => $data->{'recordtype'}, >- encoding => $data->{'encoding'} ); >+ $template->param( delete_confirm => 1 ); >+ my $dbh = C4::Context->dbh; >+ >+ my $sth2 = $dbh->prepare( >+"select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name" >+ ); >+ $sth2->execute($searchfield); >+ my $data = $sth2->fetchrow_hashref; >+ $sth2->finish; >+ >+ $template->param( >+ host => $data->{'host'}, >+ port => $data->{'port'}, >+ db => $data->{'db'}, >+ userid => $data->{'userid'}, >+ password => $data->{'password'}, >+ checked => $data->{'checked'}, >+ rank => $data->{'rank'}, >+ syntax => $data->{'syntax'}, >+ timeout => $data->{'timeout'}, >+ recordtype => $data->{'recordtype'}, >+ encoding => $data->{'encoding'} >+ ); > > # END $OP eq DELETE_CONFIRM > ################## DELETE_CONFIRMED ################################## >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index 9fbddbd..47be33e 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -23,7 +23,7 @@ > > use strict; > use warnings; >-use CGI qw( -utf8 ); >+use CGI qw / -utf8 /; > > use C4::Auth; > use C4::Output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >index 81df25d..fe2ba3f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >@@ -241,7 +241,7 @@ > <input type="text" name="timeout" id="timeout" size="4" value="[% timeout %]" onblur="isNum(this)" /> seconds > </li> > <li><label for="recordtype">Record type: </label> >- <select name="recordtype" id="recordtype"> >+ <select name="recordtype" id="recordtype"> > [% IF ( recordtypebiblio ) %] > <option value="biblio" selected="selected">Bibliographic</option> > [% ELSE %] >@@ -253,7 +253,7 @@ > <option value="authority">Authority</option> > [% END %] > </select> >- </li> >+ </li> > </ol> > </fieldset> > >@@ -314,7 +314,7 @@ > > [% IF ( searchfield ) %] > You searched for [% searchfield %] >- [% END %] >+ [% END %] > <table id="serverst"> > <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th> </th><th> </th> > </tr></thead> >@@ -324,9 +324,11 @@ > [% ELSE %] > <tr> > [% END %] >-<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td> <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td><td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.name |url %]">Delete</a></td> </tr> >+<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td> >+ >+<td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td><td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.name |url %]">Delete</a></td> </tr> > [% END %]</tbody> >- </table> >+</table> > > [% IF ( offsetgtzero ) %]<form action="[% script_name %]" method="get"> > <input type="hidden" name="offset" value="[% prevpage %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >index 42a23f8..a7b697e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >@@ -101,7 +101,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <div> > [% END %] > <div id="bd"> >- [% IF ( opsearch ) %] >+ [% IF ( opsearch ) %] > <h2>Z39.50 Authority search points</h2> > <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed"> > <input type="hidden" name="op" id="op" value="do_search" /> >@@ -160,7 +160,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > </tr></thead> > <tbody>[% FOREACH breeding_loo IN breeding_loop %] > [% IF ( breeding_loo.breedingid ) %] >- <tr id="row[% breeding_loo.breedingid %]"> >+ <tr id="row[% breeding_loo.breedingid %]"> > <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]'); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td> > <td>[% breeding_loo.heading %]</td> > <td>[% breeding_loo.heading_code %]</td> >@@ -214,11 +214,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > </div> > [% END %] > <div class="dialog message">Nothing found.</div> >- <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="submit" value="Try Another Search"/></form></p> >+ <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="submit" value="Try Another Search"/></form></p> > [% END %] > > [% END %] >- </div> >+</div> > </div> > > [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %] >-- >1.7.7.4
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 10096
:
18001
|
18011
|
18108
|
18648
|
18789
|
18790
|
18791
|
19957
|
19958
|
19959
|
19960
|
20927
|
20928
|
20929
|
21611
|
21612
|
21762
|
21763