From 41d3d5314e4e894c6865a973606b21cbf9279c49 Mon Sep 17 00:00:00 2001 From: Mason James 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 @@ seconds
  • - [% IF ( recordtypebiblio ) %] [% ELSE %] @@ -253,7 +253,7 @@ [% END %] -
  • + @@ -314,7 +314,7 @@ [% IF ( searchfield ) %] You searched for [% searchfield %] - [% END %] + [% END %] @@ -324,9 +324,11 @@ [% ELSE %] [% END %] - + + + [% END %] -
    TargetHostname/PortDatabaseUseridPasswordCheckedRankSyntaxEncodingTimeoutRecord type  
    [% loo.name %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% loo.password %][% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %][% loo.rank %] [% loo.syntax %][% loo.encoding %][% loo.timeout %][% loo.recordtype %]EditDelete
    [% loo.name %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% loo.password %][% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %][% loo.rank %][% loo.syntax %][% loo.encoding %][% loo.timeout %][% loo.recordtype %]EditDelete
    + [% IF ( offsetgtzero ) %]
    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 :
    [% END %]
    - [% IF ( opsearch ) %] + [% IF ( opsearch ) %]

    Z39.50 Authority search points

    @@ -160,7 +160,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% FOREACH breeding_loo IN breeding_loop %] [% IF ( breeding_loo.breedingid ) %] - + [% breeding_loo.server %] [% breeding_loo.heading %] [% breeding_loo.heading_code %] @@ -214,11 +214,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
    [% END %]
    Nothing found.
    -

    +

    [% END %] [% END %] -
    + [% IF ( numberpending ) %]

    Still [% numberpending %] servers to search

    [% END %] -- 1.7.7.4