https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3116

M. Tompsett <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|[email protected]        |[email protected]

--- Comment #2 from M. Tompsett <[email protected]> ---
I don't remember what I was thinking, nor do I understand the problem.
Resetting back to defaults.

I don't think

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 10faa83..9a5a372 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -958,11 +958,11 @@ sub GetISBDView {
                   if ( ( $template eq 'opac' )
                     && ( $tagslib->{$fieldvalue}->{$subfvalue}->{'hidden'} ||
0 ) > 0 );
                 foreach my $field (@fieldslist) {
+                    my $tag = $field->tag();
                     foreach my $subfield ( $field->subfield($subfvalue) ) {
-                        my $calculated = $analysestring;
-                        my $tag        = $field->tag();
                         if ( $tag < 10 ) {
                         } else {
+                            my $calculated = $analysestring;
                             my $subfieldvalue = GetAuthorisedValueDesc( $tag,
$subfvalue, $subfield, '', $tagslib );
                             my $tagsubf = $tag . $subfvalue;
                             $calculated =~
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
@@ -988,7 +988,16 @@ sub GetISBDView {
                     my $tag        = $field->tag();
                     if ( $tag < 10 ) {
                     } else {
-                        my @subf = $field->subfields;
+                        my @ordered_subfields;
+                        while ($calculated =~ /(\d\d\d)([0-9a-zA-Z])/g) {
+                            push @ordered_subfields,$2;
+                        }
+                        my @subf;
+                        foreach my $subtag (@ordered_subfields) {
+                            foreach my $subfield ($field->subfields) {
+                                push @subf,[@{$subfield}] if $subfield->[0] eq
$subtag;
+                            }
+                        }
                         for my $i ( 0 .. $#subf ) {
                             my $valuecode     = $subf[$i][1];
                             my $subfieldcode  = $subf[$i][0];

Was what people were wanting.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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/

Reply via email to