[Koha-patches] [PATCH] Populated MARC 952$2 field for serials-edit.pl

David Birmingham dbirmingham at ptfs.com
Wed Jan 27 18:36:53 CET 2010


---
 C4/Biblio.pm |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 7b17981..80f8460 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -2369,6 +2369,22 @@ sub PrepareItemrecordDisplay {
                         }
 
                         #---- "true" authorised value
+                    }
+                    elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq
+                        "cn_source" )
+                    {
+                      my $class_sources = GetClassSources();
+                      my $default_source = C4::Context->preference("DefaultClassificationSource");
+                      foreach my $class_source (sort keys %$class_sources) {
+                        next unless $class_sources->{$class_source}->{'used'} or
+                                    ($value and $class_source eq $value)      or
+                                    ($class_source eq $default_source);
+                        push @authorised_values, $class_source;
+                        $authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'};
+                      }
+                      $value = $default_source unless ($value);
+
+                      #---- "true" authorised value
                     } else {
                         $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} );
                         push @authorised_values, ""
-- 
1.5.6.5




More information about the Koha-patches mailing list