From fc0d7e22e592c97cc0496952fe27a7b10f31e2d2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Nov 2018 17:31:53 +0100 Subject: [PATCH] get error msg from controller if set --- op/op.RemoveDocument.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php index aa11d74fc..cb9463b64 100644 --- a/op/op.RemoveDocument.php +++ b/op/op.RemoveDocument.php @@ -90,7 +90,11 @@ $controller->setParam('document', $document); $controller->setParam('index', $index); $controller->setParam('indexconf', $indexconf); if(!$controller->run()) { - UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($docname))),getMLText("error_remove_document")); + if ($controller->getErrorMsg() != '') + $errormsg = $controller->getErrorMsg(); + else + $errormsg = "error_remove_document"; + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($docname))),getMLText($errormsg)); } if ($notifier){