Bug 15875

Summary: Refactor DB accessors from "z39.50 admin setup / z3950servers.pl" to C4::Breeding
Product: Koha Reporter: Olli-Antti Kivilahti <olli-antti.kivilahti>
Component: Z39.50 / SRU / OpenSearch ServersAssignee: Galen Charlton <gmcharlt>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15298
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 15875 - Refactor DB accessors from "z39.50 admin setup / z3950servers.pl" to C4::Breeding

Description Olli-Antti Kivilahti 2016-02-22 10:32:28 UTC
z3950servers.pl is a horrible mess of hard SQL in the perl script/Controller-layer.
Also a lack of proper internal API for mutating Z3950servers makes writing tests much harder.

This patch refactors z3950servers.pl by moving SQL to C4::Breeding under proper accessors.
Comment 1 Olli-Antti Kivilahti 2016-02-22 10:38:40 UTC
Created attachment 48268 [details] [review]
Bug 15875 - Refactor DB accessors from "z39.50 admin setup / z3950servers.pl" to C4::Breeding

z3950servers.pl is a horrible mess of hard SQL in the perl script/Controller-layer.
Also a lack of proper internal API for mutating Z3950servers makes writing tests much harder.

This patch refactors z3950servers.pl by moving SQL to C4::Breeding under proper accessors.
Comment 2 Marcel de Rooy 2016-02-22 10:56:50 UTC
sub castCGIToZ3950serverParams {
+    my ($cgi) = @_;
+
+    my $params = {};
+    $params->{'host'} =        $input->param('host'),

Sure this is what you mean? :)
cgi..inpuy
Comment 3 Marcel de Rooy 2016-02-22 10:57:07 UTC
horrible mess :)
Comment 4 Katrin Fischer 2023-08-28 21:25:09 UTC
Should now be written using objects in the Koha namespace instead of moving code into C4. Closing WONTFIX for now. I think a new bug would be better if this is tackled again according to current coding practice.