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