ezsystems/ezpublish-kernel — pull request #832 by bdunogier (2014-05-05 08:44:36+00:00)
Title: Fixed re-injection of settings upon scope change

> Fixes http://jira.ez.no/browse/EZP-22477
> Status: runs, but doesn't fix the issue. Admin siteaccess alias list is still read, and the previewed alias is missing.

Upon scope change, as used in ContentPreview, eZINI keeps in-memory cache of previously read variables. This creates situations where settings from the (scope) siteaccess we switched to aren't made available.

A new event, `LegacyEvents::PRE_RESET_LEGACY_KERNEL` is introduced. It is used in the newly added method `eZ\Publish\Core\MVC\Legacy\Kernel\Loader::resetKernel()`, before the legacy kernel services are cleared from the container.

This event is listened for by `eZ\Bundle\EzPublishLegacyBundle\EventListener\LegacyKernelListener`, that resets `eZINI` instances.