mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
- better error checking in verifyLastestContentExpriry() just in case the
latest content could not be found
This commit is contained in:
parent
4bfcad0784
commit
44278d35be
|
@ -464,15 +464,17 @@ class LetoDMS_Core_Document { /* {{{ */
|
||||||
// return true if status has changed (to reload page)
|
// return true if status has changed (to reload page)
|
||||||
function verifyLastestContentExpriry(){ /* {{{ */
|
function verifyLastestContentExpriry(){ /* {{{ */
|
||||||
$lc=$this->getLatestContent();
|
$lc=$this->getLatestContent();
|
||||||
$st=$lc->getStatus();
|
if($lc) {
|
||||||
|
$st=$lc->getStatus();
|
||||||
|
|
||||||
if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP) && $this->hasExpired()){
|
if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP) && $this->hasExpired()){
|
||||||
$lc->setStatus(S_EXPIRED,"");
|
$lc->setStatus(S_EXPIRED,"");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ($st["status"]==S_EXPIRED && !$this->hasExpired() ){
|
else if ($st["status"]==S_EXPIRED && !$this->hasExpired() ){
|
||||||
$lc->verifyStatus(true);
|
$lc->verifyStatus(true);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user