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.
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.
sub castCGIToZ3950serverParams { + my ($cgi) = @_; + + my $params = {}; + $params->{'host'} = $input->param('host'), Sure this is what you mean? :) cgi..inpuy
horrible mess :)
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.