Bugzilla – Attachment 8422 Details for
Bug 7768
acqui/z3950_search.pl: remove sub displayresults to fix scoping
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping
Bug-7768---acquiz3950searchpl-remove-sub-displayre.patch (text/plain), 3.22 KB, created by
Dobrica Pavlinusic
on 2012-03-21 14:47:47 UTC
(
hide
)
Description:
Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2012-03-21 14:47:47 UTC
Size:
3.22 KB
patch
obsolete
>From 947eb7482f8d674867a359741ac76456af322736 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 21 Mar 2012 10:43:31 +0100 >Subject: [PATCH] Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping > >--- > acqui/z3950_search.pl | 42 +++++++++++++++++++++--------------------- > 1 files changed, 21 insertions(+), 21 deletions(-) > >diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl >index 80503e0..4d4545e 100755 >--- a/acqui/z3950_search.pl >+++ b/acqui/z3950_search.pl >@@ -64,7 +64,6 @@ my $op = $input->param('op'); > my $booksellerid = $input->param('booksellerid'); > my $basketno = $input->param('basketno'); > my $noconnection; >-my $numberpending; > my $attr = ''; > my $term; > my $host; >@@ -88,7 +87,7 @@ unless ($random) > $random = rand(1000000000); > } > >-my $DEBUG = 0; # if set to 1, many debug message are send on syslog. >+my $DEBUG = $ENV{DEBUG} || 0; # if set to 1, many debug message are send on syslog. > > # get framework list > my $frameworks = getframeworks; >@@ -131,11 +130,12 @@ if ( $op ne "do_search" ) { > biblionumber => $biblionumber, > ); > output_html_with_http_headers $input, $cookie, $template->output; >+ exit; > } >-else { >+ > my @id = $input->param('id'); > >- if ( not defined @id ) { >+ if ( not @id ) { > # empty server list -> report and exit > $template->param( emptyserverlist => 1 ); > output_html_with_http_headers $input, $cookie, $template->output; >@@ -228,7 +228,10 @@ warn "query ".$query if $DEBUG; > # $oResult[$z] = $oConnection[$z]->search_pqf($query); > } > >-sub displayresults { >+ warn "# nremaining = $nremaining\n" if $DEBUG; >+ >+ while ( $nremaining-- ) { >+ > my $k; > my $event; > while ( ( $k = ZOOM::event( \@oConnection ) ) != 0 ) { >@@ -241,7 +244,7 @@ sub displayresults { > > if ( $k != 0 ) { > $k--; >- warn $serverhost[$k] if $DEBUG; >+ warn "event from $k server = ",$serverhost[$k] if $DEBUG; > my ( $error, $errmsg, $addinfo, $diagset ) = > $oConnection[$k]->error_x(); > if ($error) { >@@ -252,6 +255,7 @@ sub displayresults { > } > else { > my $numresults = $oResult[$k]->size(); >+ warn "numresults = $numresults" if $DEBUG; > my $i; > my $result = ''; > if ( $numresults > 0 ) { >@@ -305,20 +309,16 @@ sub displayresults { > } #$numresults > } > } # if $k !=0 >- $numberpending = $nremaining - 1; >- $template->param( >- breeding_loop => \@breeding_loop, >- server => $servername[$k], >- numberpending => $numberpending, >- errconn => \@errconn >- ); >- output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0; >- > # print $template->output if $firstresult !=1; > $firstresult++; >-} >-displayresults(); >-while ( --$nremaining > 0 ) { >- displayresults(); >- } >-} ## if op=search >+ >+ } # while nremaining >+ >+$template->param( >+breeding_loop => \@breeding_loop, >+#server => $servername[$k], >+numberpending => $nremaining > 0 ? $nremaining : 0, >+errconn => \@errconn >+); >+output_html_with_http_headers $input, $cookie, $template->output; >+ >-- >1.7.2.5
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 7768
:
8387
|
8422
|
8444