mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
fix php warnings and propperly handle failure of cancelCheckout()
This commit is contained in:
parent
20b03dcbe0
commit
eb4b28ea8c
|
@ -46,9 +46,8 @@ if(empty($_POST['confirm'])) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("operation_disallowed"));
|
||||
}
|
||||
|
||||
$document->cancelCheckOut($comment);
|
||||
if (is_bool($result) && !$result) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
if(!$document->cancelCheckOut()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_cancel_checkout"));
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_cancel_checkout')));
|
||||
add_log_line("?documentid=".$documentid);
|
||||
|
|
Loading…
Reference in New Issue
Block a user