Fix form population in case the user navigates backwards to make changes

refs #7163
This commit is contained in:
Johannes Meyer 2014-10-02 17:08:55 +02:00
parent 4f52da95ac
commit 0f302bfc0a
1 changed files with 9 additions and 0 deletions

View File

@ -84,6 +84,15 @@ class WebSetup extends Wizard implements SetupWizard
}
} elseif ($page->getName() === 'setup_authentication_backend') {
$authData = $this->getPageData('setup_authentication_type');
if (($backendData = $this->getPageData($page->getName())) !== null
&& $backendData['backend'] !== $authData['type']
) {
// Drop any existing page data in case the authentication type has changed,
// otherwise it will conflict with other forms that depend on this one
$pageData = & $this->getPageData();
unset($pageData[$page->getName()]);
}
if ($authData['type'] === 'db') {
$page->setResourceConfig($this->getPageData('setup_db_resource'));
} elseif ($authData['type'] === 'ldap') {