http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7379
--- Comment #3 from Adrien SAURAT <adrien.sau...@biblibre.com> 2012-01-03 10:51:25 UTC --- Well, refactoring could take some time and is not necessarily useful. Indenting is quick to do and makes the file more readable (but the patch far less readable indeed). I'll follow any line, but it needs to be clear, Chris told me a few weeks ago that it was good to enhance the code whenever possible without creating new bugs for this. ====================================== I'll help you read this patch. I used the same code already used for "ccode", adding this in opac-detail.pl : my $copynumbers = GetKohaAuthorisedValues('items.copynumber',$dat->{'frameworkcode'}, 'opac'); ... if ( my $copynumber = $itm->{'copynumber'} ) { $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && exists( $copynumbers->{$copynumber} ) ); } and this in detail.pl : my $copynumbers = GetKohaAuthorisedValues('items.copynumber', $fw); ... my $copynumber = $item->{'copynumber'}; $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined( $copynumber ) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); ========================== Next time I'll try to modify only the code surrounding the bug fix. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/