Temporary fix until we get feature activation complete

In order to load the list of slugs for pages and blogs posts,
we need to call "HackSimulateExtensionActivation" when a shell
is activated. We had lost this call with the multi-tenancy work.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay 2010-04-30 20:17:54 -07:00
parent 3f70ab177f
commit 16cc07cf7a

View File

@ -83,18 +83,22 @@ namespace Orchard.Environment {
return allSettings.Select(
settings => {
var context = CreateShellContext(settings);
context.Shell.Activate();
_runningShellTable.Add(settings);
ActivateShell(context);
return context;
});
}
var setupContext = CreateSetupContext();
setupContext.Shell.Activate();
_runningShellTable.Add(setupContext.Settings);
ActivateShell(setupContext);
return new[] { setupContext };
}
private void ActivateShell(ShellContext context) {
context.Shell.Activate();
_runningShellTable.Add(context.Settings);
HackSimulateExtensionActivation(context.LifetimeScope);
}
ShellContext CreateSetupContext() {
Logger.Debug("Creating shell context for root setup");
return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" });