Selaa lähdekoodia

Merge branch '2.3'

Sullivan SENECHAL 9 vuotta sitten
vanhempi
commit
cf6eb9c697
1 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 7 7
      Controller/CRUDController.php

+ 7 - 7
Controller/CRUDController.php

@@ -301,7 +301,7 @@ class CRUDController extends Controller
 
         if ($this->getRestMethod() == 'DELETE') {
             // check the csrf token
-            $this->validateCsrfToken('sonata.delete', $request);
+            $this->validateCsrfToken('sonata.delete');
 
             $objectName = $this->admin->toString($object);
 
@@ -337,7 +337,7 @@ class CRUDController extends Controller
                 );
             }
 
-            return $this->redirectTo($object, $request);
+            return $this->redirectTo($object);
         }
 
         return $this->render($this->admin->getTemplate('delete'), array(
@@ -414,7 +414,7 @@ class CRUDController extends Controller
                     );
 
                     // redirect to edit mode
-                    return $this->redirectTo($object, $request);
+                    return $this->redirectTo($object);
                 } catch (ModelManagerException $e) {
                     $this->handleModelManagerException($e);
 
@@ -528,7 +528,7 @@ class CRUDController extends Controller
         }
 
         // check the csrf token
-        $this->validateCsrfToken('sonata.batch', $request);
+        $this->validateCsrfToken('sonata.batch');
 
         $confirmation = $request->get('confirmation', false);
 
@@ -558,7 +558,7 @@ class CRUDController extends Controller
         $isRelevantAction = sprintf('batchAction%sIsRelevant', ucfirst($camelizedAction));
 
         if (method_exists($this, $isRelevantAction)) {
-            $nonRelevantMessage = call_user_func(array($this, $isRelevantAction), $idx, $allElements, $request);
+            $nonRelevantMessage = call_user_func(array($this, $isRelevantAction), $idx, $allElements);
         } else {
             $nonRelevantMessage = count($idx) != 0 || $allElements; // at least one item is selected
         }
@@ -620,7 +620,7 @@ class CRUDController extends Controller
             $query = null;
         }
 
-        return call_user_func(array($this, $finalAction), $query, $request);
+        return call_user_func(array($this, $finalAction), $query);
     }
 
     /**
@@ -700,7 +700,7 @@ class CRUDController extends Controller
                     );
 
                     // redirect to edit mode
-                    return $this->redirectTo($object, $request);
+                    return $this->redirectTo($object);
                 } catch (ModelManagerException $e) {
                     $this->handleModelManagerException($e);