[Koha-patches] [PATCH] Report to user the connections errors to z39.50 server, like timeout(10007), and refused(10000).
Nahuel ANGELINETTI
nahuel.angelinetti at biblibre.com
Fri Oct 17 09:39:39 CEST 2008
I just resend, this patch was for 3.0.x, I done another for HEAD.
bests,
Nahuel
Le Thu, 16 Oct 2008 16:41:14 -0400,
"Galen Charlton" <galen.charlton at liblime.com> a écrit :
> Hi,
>
> This patch does not apply - please rebase and resubmit it.
>
> Regards,
>
> Galen
>
> On Fri, Oct 10, 2008 at 5:42 AM, Nahuel Angelinetti
> <nahuel.angelinetti at biblibre.com> wrote:
> > ---
> > cataloguing/z3950_search.pl | 7 ++++++-
> > .../prog/en/modules/cataloguing/z3950_search.tmpl | 3 +++
> > 2 files changed, 9 insertions(+), 1 deletions(-)
> >
> > diff --git a/cataloguing/z3950_search.pl
> > b/cataloguing/z3950_search.pl index aa16706..f47f463 100755
> > --- a/cataloguing/z3950_search.pl
> > +++ b/cataloguing/z3950_search.pl
> > @@ -106,6 +106,7 @@ else {
> > my @id = $input->param('id');
> > my @oConnection;
> > my @oResult;
> > + my @errconn;
> > my $s = 0;
> > my $query;
> > my $nterms;
> > @@ -199,6 +200,9 @@ warn "query ".$query if $DEBUG;
> > my ( $error, $errmsg, $addinfo, $diagset ) =
> > $oConnection[$k]->error_x();
> > if ($error) {
> > + if ($error =~ m/^(10000|10007)$/ ) {
> > + push(@errconn, {'server' => $serverhost[$k]});
> > + }
> > warn "$k $serverhost[$k] error $query: $errmsg ($error)
> > $addinfo\n" if $DEBUG;
> >
> > @@ -263,8 +267,9 @@ warn "query ".$query if $DEBUG;
> > 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;
> > diff --git
> > a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
> > b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
> > index 202d9bb..006c31e 100644 ---
> > a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
> > +++
> > b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
> > @@ -109,6 +109,9 @@ $.tablesorter.addParser({ <!-- /TMPL_LOOP
> > --></tbody> </table> <!-- TMPL_ELSE -->
> > + <!-- TMPL_LOOP name="errconn" -->
> > + Connection failed to <!-- TMPL_VAR NAME="server" -->
> > + <!-- /TMPL_LOOP -->
> > <p>Nothing found. <a
> > href="/cgi-bin/koha/cataloguing/z3950_search.pl">Try another
> > search</a>.</p> <!-- /TMPL_IF -->
> >
> > --
> > 1.5.4.3
> >
> > _______________________________________________
> > Koha-patches mailing list
> > Koha-patches at lists.koha.org
> > http://lists.koha.org/mailman/listinfo/koha-patches
> >
>
>
>
More information about the Koha-patches
mailing list