[Koha-bugs] [Bug 21280] Unify MARC editor in biblios and authorities
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Mar 26 12:34:12 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280
--- Comment #11 from Josef Moravec <josef.moravec at gmail.com> ---
Comment on attachment 85517
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85517
Bug 21280: Move MARC editor code to a common class
Review of attachment 85517:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21280&attachment=85517)
-----------------------------------------------------------------
I just quickly go through code and found only small issues, great job Ere.
::: Koha/MarcEditor.pm
@@ +22,5 @@
> +use Modern::Perl;
> +
> +use Readonly;
> +
> +use C4::ClassSource;
use Koha::ClassSources instead
@@ +31,5 @@
> +use base qw(Class::Accessor);
> +
> +# Constants to refer to the standard editor types
> +Readonly our $EDITOR_BIBLIO => 'biblio';
> +Readonly our $EDITOR_AUTHORITY => 'authority';
use constant instead of Readonly.
See
https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL25:_Read_only_variables
@@ +347,5 @@
> + }
> + elsif ( $self->{tags}->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) {
> + push @authorised_values, "";
> +
> + my $class_sources = GetClassSources();
Could be easily replaced by Koha::ClassSource->search
@@ +377,5 @@
> + $query = "SELECT authorised_value,lib
> + FROM authorised_values
> + WHERE category=? ORDER BY lib";
> + }
> + my $authorised_values_sth = C4::Context->dbh->prepare( $query );
It would be better to use Koha::AuthorizedValues module
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list