[Koha-bugs] [Bug 12265] Improve Z39.50 servers administration (incl DBIx)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jul 14 12:14:59 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12265
--- Comment #8 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Kyle M Hall from comment #6)
> A couple place in the code you use search instead of fine. For example, I
> think
>
> my $rs=$schema->resultset('Z3950server')->search( { id => $id } );
> my $name= $rs->first?$rs->first->name:'';
> y $cnt=$rs->delete;
> $template->param( msg_deleted => 1, msg_add => $name ) if $cnt==1;
>
> Could be rewritten as
>
> my $server = $schema->resultset('Z3950server')->find($id);
> if ( $server ) {
> $server->delete();
> $template->param( msg_deleted => 1, msg_add => $server->name() );
> }
>
Thanks for QAing. Replaced two occurrences. The third one should be a search.
Added a few extra lines for additional testing.
I have changed the status back to Signed-off. If you feel that the follow-up
needs additional signoff, please set it to Needs Signoff.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list