mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
- check if any content exists and issue an error message if not
This commit is contained in:
parent
b9db056c43
commit
aeec43c5fb
|
@ -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\">";
|
||||
|
|
Loading…
Reference in New Issue
Block a user