Fix anonymous onSuccess callbacks

This commit is contained in:
Johannes Meyer 2014-11-18 13:12:30 +01:00
parent 7621f6642d
commit 4ab5b2abf3
2 changed files with 8 additions and 8 deletions

View File

@ -177,10 +177,10 @@ class ConfigController extends ActionController
public function removeauthenticationbackendAction() public function removeauthenticationbackendAction()
{ {
$form = new ConfirmRemovalForm(array( $form = new ConfirmRemovalForm(array(
'onSuccess' => function ($request) { 'onSuccess' => function ($form) {
$configForm = new AuthenticationBackendConfigForm(); $configForm = new AuthenticationBackendConfigForm();
$configForm->setIniConfig(Config::app('authentication')); $configForm->setIniConfig(Config::app('authentication'));
$authBackend = $request->getQuery('auth_backend'); $authBackend = $form->getRequest()->getQuery('auth_backend');
try { try {
$configForm->remove($authBackend); $configForm->remove($authBackend);
@ -250,10 +250,10 @@ class ConfigController extends ActionController
public function removeresourceAction() public function removeresourceAction()
{ {
$form = new ConfirmRemovalForm(array( $form = new ConfirmRemovalForm(array(
'onSuccess' => function ($request) { 'onSuccess' => function ($form) {
$configForm = new ResourceConfigForm(); $configForm = new ResourceConfigForm();
$configForm->setIniConfig(Config::app('resources')); $configForm->setIniConfig(Config::app('resources'));
$resource = $request->getQuery('resource'); $resource = $form->getRequest()->getQuery('resource');
try { try {
$configForm->remove($resource); $configForm->remove($resource);

View File

@ -60,8 +60,8 @@ class Monitoring_ConfigController extends ModuleActionController
{ {
$config = $this->Config('backends'); $config = $this->Config('backends');
$form = new ConfirmRemovalForm(array( $form = new ConfirmRemovalForm(array(
'onSuccess' => function ($request) use ($config) { 'onSuccess' => function ($form) use ($config) {
$backendName = $request->getQuery('backend'); $backendName = $form->getRequest()->getQuery('backend');
$configForm = new BackendConfigForm(); $configForm = new BackendConfigForm();
$configForm->setIniConfig($config); $configForm->setIniConfig($config);
@ -92,8 +92,8 @@ class Monitoring_ConfigController extends ModuleActionController
{ {
$config = $this->Config('instances'); $config = $this->Config('instances');
$form = new ConfirmRemovalForm(array( $form = new ConfirmRemovalForm(array(
'onSuccess' => function ($request) use ($config) { 'onSuccess' => function ($form) use ($config) {
$instanceName = $request->getQuery('instance'); $instanceName = $form->getRequest()->getQuery('instance');
$configForm = new InstanceConfigForm(); $configForm = new InstanceConfigForm();
$configForm->setIniConfig($config); $configForm->setIniConfig($config);