[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
Fri Jul 11 19:16:54 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12265

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA
                 CC|                            |kyle at bywatersolutions.com

--- Comment #6 from Kyle M Hall <kyle at bywatersolutions.com> ---
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() );
}

Even after calling delete, the object is still perfectly usable, no need to
store the name in a separate variable.

Marking as failed qa. This is still only suggestion, so feel free to add a
followup, or just set status back to "signed off".

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list