You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@apache.org on 2003/07/08 00:29:50 UTC
cvs commit: xml-axkit/lib/Apache/AxKit ConfigReader.pm
matts 2003/07/07 15:29:50
Modified: . axconfig.c
lib/Apache/AxKit ConfigReader.pm
Log:
Fix to make processors outside of <AxStyleName> become global, instead of in
#default.
Revision Changes Path
1.18 +3 -3 xml-axkit/axconfig.c
Index: axconfig.c
===================================================================
RCS file: /home/cvs/xml-axkit/axconfig.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- axconfig.c 18 Mar 2003 08:43:40 -0000 1.17
+++ axconfig.c 7 Jul 2003 22:29:50 -0000 1.18
@@ -195,7 +195,7 @@
ap_register_cleanup(p, (void*)new->output_transformers, ax_cleanup_av, ap_null_cleanup);
new->current_styles = newAV();
- av_push(new->current_styles, newSVpv("#default", 0));
+ av_push(new->current_styles, newSVpv("#global", 0));
ap_register_cleanup(p, (void*)new->current_styles, ax_cleanup_av, ap_null_cleanup);
new->current_medias = newAV();
@@ -701,7 +701,7 @@
}
new->current_styles = newAV();
- av_push(new->current_styles, newSVpv("#default", 0));
+ av_push(new->current_styles, newSVpv("#global", 0));
ap_register_cleanup(p, (void*)new->current_styles, ax_cleanup_av, ap_null_cleanup);
new->current_medias = newAV();
1.16 +5 -4 xml-axkit/lib/Apache/AxKit/ConfigReader.pm
Index: ConfigReader.pm
===================================================================
RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/ConfigReader.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ConfigReader.pm 18 Mar 2003 08:43:41 -0000 1.15
+++ ConfigReader.pm 7 Jul 2003 22:29:50 -0000 1.16
@@ -347,13 +347,14 @@
$style ||= '#default';
- my $list = $self->{cfg}{Processors}{$media}{$style};
+ my $list = $self->{cfg}{Processors}{$media}{'#global'} || [];
+ push @$list, @{ $self->{cfg}{Processors}{$media}{$style} || [] };
my $processors = $self->{apache}->dir_config('AxProcessors');
if( $processors ) {
foreach my $processor (split(/\s*,\s*/, $processors) ) {
my ($pmedia, $pstyle, @processor) = split(/\s+/, $processor);
- next unless ($pmedia eq $media and $pstyle eq $style);
+ next unless ($pmedia eq $media and ($pstyle eq $style or $pstyle eq '#global'));
push (@$list, [ 'NORMAL', @processor ] );
}
}
@@ -361,7 +362,7 @@
my @processors = $self->{apache}->dir_config->get('AxProcessor');
foreach my $processor (@processors) {
my ($pmedia, $pstyle, @processor) = split(/\s+/, $processor);
- next unless ($pmedia eq $media and $pstyle eq $style);
+ next unless ($pmedia eq $media and ($pstyle eq $style or $pstyle eq '#global'));
push (@$list, [ @processor ] );
}