Changeset 32841


Ignore:
Timestamp:
2019-03-02T21:01:10+13:00 (5 years ago)
Author:
ak19
Message:

Tentative fix to metadata GPS.mapOverlay that we specify ought to be overridden getting set to accumulate instead. I understand the first time that this meta gets sets that since there's no previous value to override that this gets set to accumulate then. But in future instances where this meta value is being changed with metamode=override, I think we should ensure that the meta's (meta)mode goes into doc.xml as override instead of remaining as accumulate. This should in theory work since when the value of a meta is instructed to be changed with metamode=override, all instances of that meta (with the same metaname) gets replaced with a new instance with the new specified value, leaving that one new meta with metamode override and any future changes to that meta's value and (meta)mode will affect only that once instance. I hope. Still would like to discuss this with Dr Bainbridge to make sure there are no side-effects I can't presently foresee.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/modmetadataaction.pm

    r32782 r32841  
    859859                $attrHash->{'_content'} = $metavalue;
    860860               
     861                print STDERR "**** WARNING, NOT SURE IF IT'S ALWAYS THE RIGHT TO DO, but setting metamode to override as requested";
     862               
     863                $attrHash->{'mode'} = $metamode; # if it was set to accumulate the first time this meta was added, make sure it is set to override now
     864               
    861865                # Don't want it to wipe out any other pieces of metadata
    862866                $parser->{'parameters'}->{'metamode'} = "done";
     
    868872                my $metavalue = $parser->{'parameters'}->{'metavalue'};
    869873                $attrHash->{'_content'} = $metavalue;
     874               
     875                print STDERR "**** WARNING, NOT SURE IF IT'S ALWAYS THE RIGHT TO DO, but setting metamode to override as requested";
     876                $attrHash->{'mode'} = $metamode; # if it was set to accumulate the first time this meta was added, make sure it is set to override now
     877               
    870878                $parser->{'parameters'}->{'metamode'} = "done";
    871879
Note: See TracChangeset for help on using the changeset viewer.