1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00

Update SystemUpdater module to remove any session data associated with admin theme when a core update occurs

This commit is contained in:
Ryan Cramer
2016-11-03 11:11:40 -04:00
parent 2135f2ca2e
commit 0fb25668c4

View File

@@ -144,9 +144,12 @@ class SystemUpdater extends WireData implements Module, ConfigurableModule {
$this->configData['coreVersion'] = $toVersion;
$this->wire('modules')->saveModuleConfigData($this, $this->configData);
/** @var AdminTheme $adminTheme */
$adminTheme = $this->wire('adminTheme');
if($adminTheme) $adminTheme->coreUpdate($fromVersion, $toVersion);
// remove admin theme cached info in session
foreach($this->wire('session') as $key => $value) {
if(strpos($key, 'AdminTheme') === 0) {
$this->wire('session')->remove($key);
}
}
}
/**