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

View File

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