From f409783ae319bf47bf8f45ada84e114b9b94357a Mon Sep 17 00:00:00 2001
From: Pierre-Lin Bonnemaison <pierre.lin@free.fr>
Date: Mon, 17 Aug 2015 22:54:18 +0200
Subject: [PATCH] Fixe redirection commande

---
 controllers/commands.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/controllers/commands.php b/controllers/commands.php
index 4d6206f..5b21da8 100755
--- a/controllers/commands.php
+++ b/controllers/commands.php
@@ -41,7 +41,7 @@
 			if (!internalTools::verifyCSRF($csrf))
 			{
 				$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
-				header('Location: ' . $this->generateUrl('commands', 'showAll'));
+				header('Location: ' . $this->generateUrl('commands'));
 				return false;
 			}
 
@@ -88,7 +88,7 @@
 			if (!internalTools::verifyCSRF($csrf))
 			{
 				$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
-				header('Location: ' . $this->generateUrl('commands', 'showAll'));
+				header('Location: ' . $this->generateUrl('commands'));
 				return true;
 			}
 
@@ -108,7 +108,7 @@
 			$db->insertIntoTable('events', ['type' => 'COMMAND_ADD', 'text' => 'Ajout commande : ' . $nom . ' => ' . $script]);
 			
 			$_SESSION['successmessage'] = 'La commande a bien été créée.';
-			header('Location: ' . $this->generateUrl('commands', 'showAll'));
+			header('Location: ' . $this->generateUrl('commands'));
 			return true;
 
 		}
@@ -124,7 +124,7 @@
 			if (!internalTools::verifyCSRF($csrf))
 			{
 				$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
-				header('Location: ' . $this->generateUrl('commands', 'showAll'));
+				header('Location: ' . $this->generateUrl('commands'));
 				return false;
 			}
 
@@ -139,6 +139,6 @@
 			}
 
 			$_SESSION['successmessage'] = 'Toutes les commandes ont été modifiées avec succès.';
-			header('Location: ' . $this->generateUrl('commands', 'showAll'));
+			header('Location: ' . $this->generateUrl('commands'));
 		}
 	}