| Summary: | Wrong order for parameters in Z39.50 SQL INSERT | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Adrien SAURAT <adrien.saurat> |
| Component: | Z39.50 / SRU / OpenSearch Servers | Assignee: | Adrien SAURAT <adrien.saurat> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P5 - low | CC: | chris, dpavlin, koha.sekjal, paul.poulain |
| Version: | 3.8 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
proposed patch
Bug 8027: fix param order for z3950 INSERT |
||
Created attachment 9364 [details] [review] proposed patch Created attachment 9365 [details] [review] Bug 8027: fix param order for z3950 INSERT In the z3950servers.pl order of columns which are inserted for new server is wrong, which results in empty timeout and encoding values when new server is added. Test scenario: 1. Open Z39.50 server administration 2. add new server with encoding and timeout 3. save server and verify that it has encoding and timeout Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> I added test scenario and fixed bug number in commit message. Switches the params to match the order of the INSERT statement. Marking Passed QA. |
In the z3950servers.pl page, the INSERT for new servers is prepared like this : =================================== INSERT INTO z3950servers (host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) =================================== but then executed like this : =================================== $sth->execute( $input->param( 'host' ), $input->param( 'port' ), $input->param( 'db' ), $input->param( 'userid' ), $input->param( 'password' ), $input->param( 'searchfield' ), $checked, $input->param( 'rank' ), $input->param( 'syntax' ), $input->param( 'timeout' ), $input->param( 'encoding' ) ); } =================================== The last parameters, timeout and encoding, are not in the same order.