mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
check experation and set status accordingly before listing documents
This commit is contained in:
parent
fc9ec1d3e3
commit
75183a9d36
|
@ -141,6 +141,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
|
|||
foreach($hits as $hit) {
|
||||
if($tmp = $dms->getDocument($hit['document_id'])) {
|
||||
if($tmp->getAccessMode($user) >= M_READ) {
|
||||
$tmp->verifyLastestContentExpriry();
|
||||
$entries[] = $tmp;
|
||||
$dcount++;
|
||||
}
|
||||
|
@ -368,6 +369,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
|
|||
if($resArr['folders']) {
|
||||
foreach ($resArr['folders'] as $entry) {
|
||||
if ($entry->getAccessMode($user) >= M_READ) {
|
||||
$entry->verifyLastestContentExpriry();
|
||||
$entries[] = $entry;
|
||||
$fcount++;
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
|
@ -185,6 +186,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) /* && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId() */) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
|
@ -234,6 +236,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && $docIdx[$st["documentID"]][$st["version"]]['status'] == S_DRAFT_APP) {
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
|
@ -270,6 +273,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && $docIdx[$st["documentID"]][$st["version"]]['status'] == S_DRAFT_APP /* && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId() */) {
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
|
@ -365,6 +369,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
foreach ($resArr as $res) {
|
||||
$document = $dms->getDocument($res["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
// verify expiry
|
||||
if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){
|
||||
|
@ -475,6 +480,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
if ( isset($docIdx[$st["document"]][$st["version"]]) && !in_array($st["document"], $dList) ) {
|
||||
$dList[] = $st["document"];
|
||||
$document = $dms->getDocument($st["document"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
|
@ -512,6 +518,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
if (!in_array($st["document"], $iRev) && isset($docIdx[$st["document"]][$st["version"]]) && !in_array($st["document"], $dList) /* && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId() */) {
|
||||
$dList[] = $st["document"];
|
||||
$document = $dms->getDocument($st["document"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
|
@ -597,6 +604,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
foreach ($resArr as $res) {
|
||||
$document = $dms->getDocument($res["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
// verify expiry
|
||||
if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){
|
||||
|
@ -673,6 +681,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
foreach ($resArr as $res) {
|
||||
$document = $dms->getDocument($res["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
// verify expiry
|
||||
if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){
|
||||
|
@ -770,6 +779,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
foreach ($resArr as $res) {
|
||||
$document = $dms->getDocument($res["documentID"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
// verify expiry
|
||||
if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){
|
||||
|
|
|
@ -259,6 +259,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
foreach($documents as $document) {
|
||||
$document->verifyLastestContentExpriry();
|
||||
echo $this->documentListRow($document, $previewer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user