Bugzilla – Attachment 3738 Details for
Bug 4189
Searching z39.50 without selecting any servers results in error message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed off patch
0001-SIGNED-OFF-Searching-z39.50-without-selecting-any-se.patch (text/plain), 3.15 KB, created by
Katrin Fischer
on 2011-04-06 11:50:38 UTC
(
hide
)
Description:
Signed off patch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-04-06 11:50:38 UTC
Size:
3.15 KB
patch
obsolete
>From 8169a5596f71b27f61e1cfa134cea7f9e9700121 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 30 Mar 2011 17:08:57 -0300 >Subject: [PATCH] [SIGNED-OFF] Searching z39.50 without selecting any servers results in error message >Content-Type: text/plain; charset="utf-8" > >This patch makes z3950_search.pl handle the situation properly, and z3950_search.tmpl >show a proper message instead of a program error. All this, in case the javascript >checks that alert the user (that at least one target has to be chosen) are by-passed. > >Regards >To+ > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Fixed small translation problem in javascript alert message. >--- > cataloguing/z3950_search.pl | 8 ++++++++ > .../prog/en/modules/cataloguing/z3950_search.tmpl | 18 +++++++++++++++--- > 2 files changed, 23 insertions(+), 3 deletions(-) > >diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl >index 6311c0b..b12a9c9 100755 >--- a/cataloguing/z3950_search.pl >+++ b/cataloguing/z3950_search.pl >@@ -103,6 +103,14 @@ if ( $op ne "do_search" ) { > } > else { > my @id = $input->param('id'); >+ >+ if ( not defined @id ) { >+ # empty server list -> report and exit >+ $template->param( emptyserverlist => 1 ); >+ output_html_with_http_headers $input, $cookie, $template->output; >+ exit; >+ } >+ > my @oConnection; > my @oResult; > my @errconn; >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 f0b11f8..d4b292f 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 >@@ -22,6 +22,7 @@ function closemenu(){ > $(".linktools").hide(); > $("tr").removeClass("selected"); > } >+ > $(document).ready(function(){ > $("#CheckAll").click(function(){ > $(".checkboxed").checkCheckboxes(); >@@ -52,6 +53,13 @@ $(document).ready(function(){ > var row = $(this).parent(); > row.addClass("selected"); > }); >+ $("form[name='f']").submit(function(){ >+ if ($('input[type=checkbox]').filter(':checked').length == 0) { >+ alert(_("Please choose at least one Z39.50 target")); >+ return false; >+ } else >+ return true; >+ }); > }); > > //]]> >@@ -153,9 +161,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <!-- /TMPL_LOOP --></tbody> > </table> > <!-- TMPL_ELSE --> >- <!-- TMPL_LOOP name="errconn" --> >- Connection failed to <!-- TMPL_VAR NAME="server" --> >- <!-- /TMPL_LOOP --> >+ <!-- TMPL_IF NAME="emptyserverlist" --> >+ You didn't select any Z39.50 target. >+ <!-- TMPL_ELSE --> >+ <!-- TMPL_LOOP name="errconn" --> >+ Connection failed to <!-- TMPL_VAR NAME="server" --> >+ <!-- /TMPL_LOOP --> >+ <!-- /TMPL_IF --> > <p>Nothing found. <a href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Try another search</a>.</p> > <!-- /TMPL_IF --> > >-- >1.7.1 >
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 4189
:
3542
| 3738