diff --git a/Layout/default/Contract/Form.php b/Layout/default/Contract/Form.php index 0b5a4d714..d3703e3b4 100644 --- a/Layout/default/Contract/Form.php +++ b/Layout/default/Contract/Form.php @@ -166,11 +166,11 @@
diff --git a/application/Contract/ContractController.php b/application/Contract/ContractController.php index 6ab6b9345..2069beb4c 100644 --- a/application/Contract/ContractController.php +++ b/application/Contract/ContractController.php @@ -61,7 +61,19 @@ class ContractController extends mfBaseController { } protected function editAction() { + $id = $this->request->id; + if(!is_numeric($id) || !$id) { + $this->layout()->setFlash("Vertrag nicht gefunden", "error"); + $this->redirect("Contract"); + } + $contract = new Contract($id); + if(!$contract->id) { + $this->layout()->setFlash("Vertrag nicht gefunden", "error"); + $this->redirect("Contract"); + } + + $this->layout()->set("contract", $contract); return $this->addAction(); }