Bug 7778

Summary: Not possible to add new z39.50 servers
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Z39.50 / SRU / OpenSearch ServersAssignee: Adrien SAURAT <adrien.saurat>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: blocker    
Priority: P5 - low CC: adrien.saurat, chris, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: proposed patch #1
[SIGNED-OFF] Bug 7778: fixes creation of a new server

Description Katrin Fischer 2012-03-21 11:29:09 UTC
It's not possible to add a new z39.50 server in current master. After saving you get a success message, but the server is not added.

The logs show an error:

[Wed Mar 21 12:20:42 2012] [error] [client 127.0.0.1] [Wed Mar 21 12:20:42 2012] z3950servers.pl: DBD::mysql::st execute failed: called with 9 bind variables when 10 are needed at /home/katrin/kohaclone/admin/z3950servers.pl line 115., referer: http://localhost:8080/cgi-bin/koha/admin/z3950servers.pl?op=add_form
Comment 1 Adrien SAURAT 2012-03-21 14:34:28 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2012-03-21 15:08:43 UTC
Created attachment 8429 [details] [review]
[SIGNED-OFF] Bug 7778: fixes creation of a new server

It is now possible to add a new server
The page also now complies with the bug 2505 request
(use warnings has been added, and variables declarations
corrected to prevent warnings)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works perfectly, tested adding, editing and deleting z39.50 servers.
Comment 3 Ian Walls 2012-03-21 20:29:40 UTC
Better handles several default cases, and makes the DB query syntax much easier to read and understand.  Good fix, marking as Passed QA.
Comment 4 Paul Poulain 2012-03-22 08:02:03 UTC
This patch also improves code quality => great job katrin !

(assigned to 3.6 but not sure the problem exist here: it would be surprising that no-one spotted it before !)
Comment 5 Katrin Fischer 2012-03-22 08:55:40 UTC
Paul, it was not me, but Adrien :) He fixed it fast and made the code better :)