Changeset 25669


Ignore:
Timestamp:
2012-05-24T13:12:00+12:00 (12 years ago)
Author:
ak19
Message:

If ImagePlugin or PagedImagePlugin are in the PluginList, the conversion process now creates a replaceListRef for gs2-image, so that format statements can make references to Thumb icon and Image macros.

File:
1 edited

Legend:

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

    r25662 r25669  
    330330
    331331    # import plugins
    332  
     332    # if ImagePlugin is added, then need to add in a replaceListRef element for gs2-image
     333    my $contains_image_plugin = 0;
     334
    333335    my $plugins = $collectcfg->{'plugin'};
    334336   
     
    338340    foreach my $pl (@$plugins) {
    339341        my ($pluginname) = @$pl[0];
     342        if ($pluginname =~ m/^(ImagePlugin|ImagePlug|PagedImagePlugin)$/) {
     343        $contains_image_plugin = 1;
     344        }
    340345        $collwriter->startTag('plugin','name'=>$pluginname);
    341346
     
    651656    # collection
    652657    $collwriter->emptyTag('replaceListRef', 'id'=>'gs2-standard');
     658    $collwriter->emptyTag('replaceListRef', 'id'=>'gs2-image') if  $contains_image_plugin;
    653659    $collwriter->endTag('CollectionConfig');
    654660    $collwriter->end();
Note: See TracChangeset for help on using the changeset viewer.