Changeset 14955

Show
Ignore:
Timestamp:
07.02.2008 13:32:26 (11 years ago)
Author:
mdewsnip
Message:

Fixed MetadataXMLPlug.pm so empty values in metadata.xml files aren't ignored. It's sometimes important to be able to specify empty values (which are quite different from no value at all).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/MetadataXMLPlug.pm

    r13822 r14955  
    222222    elsif ($element eq "Metadata") { 
    223223    $self->{'metadata_name'} = $_{'name'}; 
     224    $self->{'metadata_value'} = ""; 
    224225    if ((defined $_{'mode'}) && ($_{'mode'} eq "accumulate")) { 
    225226        $self->{'metadata_accumulate'} = 1; 
     
    250251    } 
    251252    elsif ($element eq "Metadata") { 
     253    $self->store_saved_metadata($self->{'metadata_name'}, $self->{'metadata_value'}, $self->{'metadata_accumulate'}); 
    252254    $self->{'metadata_name'} = ""; 
    253255    } 
     
    263265    elsif (defined ($self->{'metadata_name'}) && $self->{'metadata_name'} ne "") { 
    264266    # $_ == Metadata content 
    265     my $mname = $self->{'metadata_name'}; 
    266     my $mvalue = $_; 
    267     my $md_accumulate = $self->{'metadata_accumulate'}; 
    268     $self->store_saved_metadata($mname,$mvalue,$md_accumulate); 
     267    $self->{'metadata_value'} = $_; 
    269268    } 
    270269}