get error msg from controller if set

This commit is contained in:
Uwe Steinmann 2018-11-09 17:31:53 +01:00
parent 0173de81cf
commit fc0d7e22e5

View File

@ -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){