- check if any content exists and issue an error message if not

This commit is contained in:
steinm 2012-10-22 13:32:48 +00:00
parent b9db056c43
commit aeec43c5fb

View File

@ -59,18 +59,9 @@ if ($document->verifyLastestContentExpriry()){
header("Location:../out/out.ViewDocument.php?documentid=".$documentid);
}
$versions = $document->getContent();
$latestContent = $document->getLatestContent();
$status = $latestContent->getStatus();
$reviewStatus = $latestContent->getReviewStatus();
$approvalStatus = $latestContent->getApprovalStatus();
/* Create object for checking access to certain operations */
$accessop = new LetoDMS_AccessOperation($document, $user, $settings);
// verify if file exists
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
UI::htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
UI::globalNavigation($folder);
UI::pageNavigation($docPathHTML, "view_document");
@ -140,6 +131,23 @@ if($attributes) {
<?php
UI::contentContainerEnd();
$versions = $document->getContent();
if(!$latestContent = $document->getLatestContent()) {
UI::contentHeading(getMLText("current_version"));
UI::contentContainerStart();
print getMLText('document_content_missing');
UI::contentContainerEnd();
UI::htmlEndPage();
exit;
}
$status = $latestContent->getStatus();
$reviewStatus = $latestContent->getReviewStatus();
$approvalStatus = $latestContent->getApprovalStatus();
// verify if file exists
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
UI::contentHeading(getMLText("current_version"));
UI::contentContainerStart();
print "<table class=\"folderView\">";