Changeset 15068

Show
Ignore:
Timestamp:
07.03.2008 13:47:19 (11 years ago)
Author:
xiao
Message:

when producing buildConfig.xml from collectionConfig.xml, add two more attributes: type=flaxActivity and lang=[value] into serviceRacks for flax activities.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/cfgread4gs3.pm

    r14944 r15068  
    118118    my $desid = $_{'desid'}; 
    119119    my $assigned = $_{'assigned'}; 
     120    my $lang = $_{'lang'}; 
    120121     
    121122    #@ Marking repeated block 
     
    246247            push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'desid'); 
    247248            push (@{$data->{'flaxActivity'}->[$currentIndex]}, $desid); 
     249        }        
     250     
     251        if (defined $lang and $lang =~ /\w/) { 
     252            push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'lang'); 
     253            push (@{$data->{'flaxActivity'}->[$currentIndex]}, $lang); 
    248254        }        
    249255        } 
     
    720726    } 
    721727 
    722     my $flaxActivities = $collectcfg->{"flaxActivity"}; 
     728    my $flaxActivities = $collectcfg->{"flaxActivity"}; 
    723729    foreach my $fa (@$flaxActivities) { 
    724         if(defined $fa and @$fa[0] =~ /\w/ and @$fa[1] =~ /\w/ and @$fa[2] =~ /\w/ and @$fa[3] =~ /\w/ ) { 
    725             &write_line('COLCFG', ["<serviceRack ", @$fa[0], "=\"", @$fa[1], "\" ", @$fa[2], "=\"", @$fa[3], "\" />"]); 
     730        # Six elements of the array for three attribute name/value pairs: name, desid, and lang. 
     731        if(defined $fa and @$fa[0] =~ /\w/ and @$fa[1] =~ /\w/ and @$fa[2] =~ /\w/ and @$fa[3] =~ /\w/  and @$fa[4] =~ /\w/ and @$fa[5] =~ /\w/) { 
     732            &write_line('COLCFG', ["<serviceRack type=\"flaxActivity\" ", @$fa[0], "=\"", @$fa[1], "\" ", @$fa[2], "=\"", @$fa[3], "\" ", @$fa[4], "=\"", @$fa[5], "\" />"]); 
    726733        } 
    727734    }