Skip to content

Commit

Permalink
Item9317: {OptimizePageLayout} = 0 mode should answer %RENDERZONE{"bo…
Browse files Browse the repository at this point in the history
…dy"}%

the same way as %RENDERZONE{"head"}%

git-svn-id: http://svn.foswiki.org/trunk@8315 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jul 26, 2010
1 parent af217a0 commit 274ed97
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/lib/Foswiki.pm
Expand Up @@ -3334,22 +3334,27 @@ sub _renderZone {
# algorithm runs in linear time.
my %visited;
my @total;
my @zoneIDs = values %{ $this->{_zones}{$zone} };

# When {OptimizePageLayout} is NOT set, try to treat head and body
# zones as merged for compatibility with ADDTOHEAD usage where requirements
# have been moved to the body zone. See ZoneTests/Item9317
if ( not $Foswiki::cfg{OptimizePageLayout}
and ( $zone eq 'head' or $zone eq 'body' ) )
{
@zoneIDs = ( @zoneIDs, values %{ $this->{_zones}{body} } );
my @zoneIDs = (
values %{ $this->{_zones}{head} },
values %{ $this->{_zones}{body} }
);

foreach my $zoneID (@zoneIDs) {
$this->_visitZoneID( $zoneID, \%visited, \@total );
}
undef $this->{_zones}{'head'};
undef $this->{_zones}{'body'};
}
else {
my @zoneIDs = values %{ $this->{_zones}{$zone} };

foreach my $zoneID (@zoneIDs) {
$this->_visitZoneID( $zoneID, \%visited, \@total );
}
Expand Down

0 comments on commit 274ed97

Please sign in to comment.