Skip to content

Commit

Permalink
Item14237: Minor improvements on extMgr handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 25, 2017
1 parent 7787653 commit 27f8093
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/lib/Foswiki/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use Storable qw(dclone);
# shortcut functions. Must be replaced with something more reasonable.
use CGI ();
use Compress::Zlib;
use Foswiki::ExtManager;
use Foswiki::FeatureSet qw(:all);
use Foswiki::Engine;
use Foswiki::Templates;
Expand Down Expand Up @@ -115,10 +116,11 @@ has env => (
required => 1,
);
has extMgr => (
is => 'ro',
lazy => 1,
clearer => 1,
builder => '_prepareExtMgr',
is => 'ro',
lazy => 1,
clearer => 1,
predicate => 1,
builder => '_prepareExtMgr',
);
has forms => (
is => 'ro',
Expand Down Expand Up @@ -359,6 +361,7 @@ sub BUILD {

# Reload extensions based on the configuration information.
$this->clear_extMgr;

$this->extMgr->initialize;
}

Expand Down Expand Up @@ -1598,7 +1601,6 @@ sub _prepareExtMgr {
my $this = shift;

# Don't use create() here because the latter depends on extensions.
Foswiki::load_class('Foswiki::ExtManager');
return Foswiki::ExtManager->new( app => $this );
}

Expand Down

0 comments on commit 27f8093

Please sign in to comment.