mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-31 05:57:34 +00:00
better handling of deleted documents, doesn't show error anymore
This commit is contained in:
parent
54c0acef42
commit
3b06c5c8a1
|
@ -40,18 +40,15 @@ if(isset($_GET['skip']))
|
|||
else
|
||||
$skip = array();
|
||||
|
||||
$document = null;
|
||||
$content = null;
|
||||
if(isset($_GET['documentid']) && $_GET['documentid'] && is_numeric($_GET['documentid'])) {
|
||||
$document = $dms->getDocument($_GET["documentid"]);
|
||||
if (!is_object($document)) {
|
||||
$view->exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
if($document = $dms->getDocument($_GET["documentid"])) {
|
||||
if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) {
|
||||
$content = $document->getContentByVersion($_GET['version']);
|
||||
}
|
||||
}
|
||||
} else
|
||||
$document = null;
|
||||
|
||||
if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) {
|
||||
$content = $document->getContentByVersion($_GET['version']);
|
||||
} else
|
||||
$content = null;
|
||||
}
|
||||
|
||||
if($view) {
|
||||
$view->setParam('dms', $dms);
|
||||
|
|
Loading…
Reference in New Issue
Block a user