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( return allSettings.Select(
settings => { settings => {
var context = CreateShellContext(settings); var context = CreateShellContext(settings);
context.Shell.Activate(); ActivateShell(context);
_runningShellTable.Add(settings);
return context; return context;
}); });
} }
var setupContext = CreateSetupContext(); var setupContext = CreateSetupContext();
setupContext.Shell.Activate(); ActivateShell(setupContext);
_runningShellTable.Add(setupContext.Settings);
return new[] { setupContext }; return new[] { setupContext };
} }
private void ActivateShell(ShellContext context) {
context.Shell.Activate();
_runningShellTable.Add(context.Settings);
HackSimulateExtensionActivation(context.LifetimeScope);
}
ShellContext CreateSetupContext() { ShellContext CreateSetupContext() {
Logger.Debug("Creating shell context for root setup"); Logger.Debug("Creating shell context for root setup");
return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" }); return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" });