Changeset 25731

Show
Ignore:
Timestamp:
31.05.2012 18:28:07 (7 years ago)
Author:
ak19
Message:

All collectionmeta, not just description (collectionextra) and name (collectionname), need to be written out as displayItem elements.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/bin/script/convert_coll_from_gs2.pl

    r25669 r25731  
    155155    $collwriter->startTag('displayItemList'); 
    156156    foreach my $entry ( keys %$collectionmeta) { 
    157         if (defined $name_map{$entry}) { 
    158         my $name= $name_map{$entry}; 
    159         foreach my $lang (keys %{$collectionmeta->{$entry}}) { 
    160             my $value = $collectionmeta->{$entry}->{$lang}; 
    161             if ($entry =~ /^icon/) { 
    162             $value = format_icon_value($value); 
    163             } else { 
    164             $value = tidy_up_display_item($value); 
    165             } 
    166             &output_display($collwriter, $name, $lang, $value); 
    167         } 
    168         } 
     157         # some metadata names need to be specially mapped to other names 
     158         # most of them however, can retain their original names 
     159         my $name = (defined $name_map{$entry}) ? $name_map{$entry} : $entry; 
     160         foreach my $lang (keys %{$collectionmeta->{$entry}}) { 
     161         my $value = $collectionmeta->{$entry}->{$lang}; 
     162         if ($entry =~ /^icon/) { 
     163             $value = format_icon_value($value); 
     164         } else { 
     165             $value = tidy_up_display_item($value); 
     166         } 
     167         &output_display($collwriter, $name, $lang, $value); 
     168         } 
    169169    } 
    170170    $collwriter->endTag('displayItemList');