mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 20:41:16 +02:00
Update SystemUpdater module to remove any session data associated with admin theme when a core update occurs
This commit is contained in:
@@ -144,9 +144,12 @@ class SystemUpdater extends WireData implements Module, ConfigurableModule {
|
|||||||
$this->configData['coreVersion'] = $toVersion;
|
$this->configData['coreVersion'] = $toVersion;
|
||||||
$this->wire('modules')->saveModuleConfigData($this, $this->configData);
|
$this->wire('modules')->saveModuleConfigData($this, $this->configData);
|
||||||
|
|
||||||
/** @var AdminTheme $adminTheme */
|
// remove admin theme cached info in session
|
||||||
$adminTheme = $this->wire('adminTheme');
|
foreach($this->wire('session') as $key => $value) {
|
||||||
if($adminTheme) $adminTheme->coreUpdate($fromVersion, $toVersion);
|
if(strpos($key, 'AdminTheme') === 0) {
|
||||||
|
$this->wire('session')->remove($key);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user