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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user