Skip to content

Commit

Permalink
Item14198: _renderZones() has moved in Foswiki-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Schlichting authored and Florian Schlichting committed Nov 2, 2016
1 parent 44ea4f7 commit 7202e86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/PublishPlugin/BackEnd/file.pm
Expand Up @@ -31,7 +31,7 @@ sub new {
my $class = shift;
my $this = $class->SUPER::new(@_);

my $oldmask = umask( oct(777) - $Foswiki::cfg{RCS}{dirPermission} );
my $oldmask = umask( oct(777) - ($Foswiki::cfg{RCS}{dirPermission}||$Foswiki::cfg{Store}{dirPermission}) );
$this->{params}->{outfile} ||= 'file';

if ( -e "$this->{path}/$this->{params}->{outfile}" ) {
Expand Down Expand Up @@ -67,7 +67,7 @@ sub param_schema {
sub addDirectory {
my ( $this, $name ) = @_;

my $oldmask = umask( oct(777) - $Foswiki::cfg{RCS}{dirPermission} );
my $oldmask = umask( oct(777) - ($Foswiki::cfg{RCS}{dirPermission}||$Foswiki::cfg{Store}{dirPermission}) );
eval { File::Path::mkpath("$this->{path}$this->{params}->{outfile}/$name") };
$this->{logger}->logError($@) if $@;
umask($oldmask);
Expand Down
9 changes: 8 additions & 1 deletion lib/Foswiki/Plugins/PublishPlugin/PageAssembler.pm
Expand Up @@ -104,7 +104,14 @@ sub _foswiki1x1 {
foreach grep { /^JQUERYPLUGIN::/ } keys %$zone;
}

my $result = $Foswiki::Plugins::SESSION->_renderZones($tmpl);
my $result;
if ( $Foswiki::Plugins::SESSION->can("_renderZones") ) {
# Foswiki 1.1 up to 2.0
$result = $Foswiki::Plugins::SESSION->_renderZones($tmpl);
} else {
# Foswiki 2.1 and later
$result = $Foswiki::Plugins::SESSION->zones()->_renderZones($tmpl);
}

$this->{_zones}{$_} = $zones{$_} for keys %zones;

Expand Down

0 comments on commit 7202e86

Please sign in to comment.