mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Use a dedicated method to clear a wizard's session
Simplifies session removal in case a sub-class of Icinga\Web\Wizard requires special session handling refs #7163
This commit is contained in:
parent
a8dd9c933d
commit
03bbc2e2e6
@ -27,7 +27,7 @@ class SetupController extends ActionController
|
|||||||
$installer = $wizard->getInstaller();
|
$installer = $wizard->getInstaller();
|
||||||
$success = $installer->run();
|
$success = $installer->run();
|
||||||
if ($success) {
|
if ($success) {
|
||||||
$wizard->getSession()->clear();
|
$wizard->clearSession();
|
||||||
} else {
|
} else {
|
||||||
$wizard->setIsFinished(false);
|
$wizard->setIsFinished(false);
|
||||||
}
|
}
|
||||||
|
@ -407,6 +407,14 @@ class Wizard
|
|||||||
return Session::getSession()->getNamespace(get_class($this));
|
return Session::getSession()->getNamespace(get_class($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the session being used by this wizard
|
||||||
|
*/
|
||||||
|
public function clearSession()
|
||||||
|
{
|
||||||
|
$this->getSession()->clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add buttons to the given page based on its position in the page-chain
|
* Add buttons to the given page based on its position in the page-chain
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user