From e674bbed0e86a0b7d46b4b67b6abfff1b66e9c61 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Tue, 29 Jul 2008 11:42:49 -0500 Subject: [PATCH] Bug 1953 [5/6]: whitespace changes: perltidy. ran perltidy on the whole method since I've rewritten most of it. Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- C4/Koha.pm | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 1c07cf0243..7f5bb68a55 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -889,42 +889,40 @@ SELECT lib, sub displayServers { my ( $position, $type ) = @_; - my $dbh = C4::Context->dbh; + my $dbh = C4::Context->dbh; my $strsth = 'SELECT * FROM z3950servers'; my @where_clauses; my @bind_params; - if ( $position ) { - push @bind_params, $position; + if ($position) { + push @bind_params, $position; push @where_clauses, ' position = ? '; } - if ( $type ) { - push @bind_params, $type; + if ($type) { + push @bind_params, $type; push @where_clauses, ' type = ? '; } - if ( @where_clauses ) { + # reassemble where clause from where clause pieces + if (@where_clauses) { $strsth .= ' WHERE ' . join( ' AND ', @where_clauses ); } my $rq = $dbh->prepare($strsth); - $rq->execute( @bind_params ); + $rq->execute(@bind_params); my @primaryserverloop; while ( my $data = $rq->fetchrow_hashref ) { push @primaryserverloop, - { - label => $data->{description}, - id => $data->{name}, - name => "server", - value => $data->{host} . ":" - . $data->{port} . "/" - . $data->{database}, - encoding => ($data->{encoding}?$data->{encoding}:"iso-5426"), - checked => "checked", - icon => $data->{icon}, + { label => $data->{description}, + id => $data->{name}, + name => "server", + value => $data->{host} . ":" . $data->{port} . "/" . $data->{database}, + encoding => ( $data->{encoding} ? $data->{encoding} : "iso-5426" ), + checked => "checked", + icon => $data->{icon}, zed => $data->{type} eq 'zed', opensearch => $data->{type} eq 'opensearch' }; -- 2.39.5