http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6600
Ian Walls <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com --- Comment #2 from Ian Walls <[email protected]> 2011-09-01 16:29:32 UTC --- I'm extremely leery about making a change in a major C4 subroutine to fix such a minor display issue, but in all likelihood, it's *probably* safe, since the only information being pulled in from the branches table is branchurl. However, I think a further improvement can be made. The query only selects branchurl, none of the other branch information. Later in the subroutine, another query is done EACH ITEM RETURNED by the query (which is all the items for the biblio). Here's the code: #get branch information..... my $bsth = $dbh->prepare( "SELECT * FROM branches WHERE branchcode = ? " ); $bsth->execute( $data->{'holdingbranch'} ); if ( my $bdata = $bsth->fetchrow_hashref ) { $data->{'branchname'} = $bdata->{'branchname'}; } This is using holdingbranch, which explains why the branchname is indeed the holdingbranch. Improvement: Remove this extra check altogether, and just pull in the branchname from the original query, along side branchurl. This will reduce the number of queries MySQL must perform, improving (however marginally) the performance of this subroutine. Since it's a major workhorse of a subroutine (called many time all over the codebase), the net effect could be substantial. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
