Changeset 32760

Show
Ignore:
Timestamp:
11.02.2019 13:59:29 (2 months ago)
Author:
kjdon
Message:

merge_inheritance, if it finds a conflict in option values, will keep the first value it had seen. When calling a plugin constructor with a 1 as the last arg, this means 'auxiliary' and don't parse the user options. -cover_image option is set to 1 unless -no_cover_image is specified. this means that any auxiliary plugins will end up with -cover_image=1 - as they are not parsing args, and therefore don't see -no_cover_image. Only the rxf plugin will actually get the correct value for -cover_image. therefore it needs to come first in the list in merge_inheritance. I don't know if there are any other ramifications for this change of order in merge_inheritance. All I know is that I needed to change it to make the -no_cover_image option work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm

    r32185 r32760  
    211211 
    212212    push(@{$hashArgOptLists->{"OptList"}},$options); 
    213     
     213 
    214214    my $imc_self = new ImageConverter($pluginlist, $inputargs, $hashArgOptLists); 
    215      
    216215    # we can use this plugin to check gs3 version 
    217216    if ($imc_self->{'gs_version'} eq "3") { 
     
    224223    # now we add the args to the list for parsing 
    225224    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 
    226      
     225 
    227226    my $rtf_self = new ReadTextFile($pluginlist, $inputargs, $hashArgOptLists, 1); 
    228227    my $rxf_self = new ReadXMLFile($pluginlist, $inputargs, $hashArgOptLists); 
    229  
    230     my $self = BaseImporter::merge_inheritance($imc_self,$rtf_self,$rxf_self); 
    231  
     228     
     229    my $self = BaseImporter::merge_inheritance($rxf_self, $imc_self,$rtf_self); 
     230     
    232231    # Update $self used by XML::Parser so it finds callback functions  
    233232    # such as start_document here and not in ReadXMLFile (which is what