mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
do not add item to timeline if date is empty
This commit is contained in:
parent
3c13873195
commit
3f82cb1957
|
@ -2129,9 +2129,15 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if (is_bool($resArr) && !$resArr)
|
if (is_bool($resArr) && !$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* The above query will also contain entries where a document status exists
|
||||||
|
* but no status log entry. Those records will have no date and must be
|
||||||
|
* skipped.
|
||||||
|
*/
|
||||||
foreach ($resArr as $row) {
|
foreach ($resArr as $row) {
|
||||||
$date = $row['date'];
|
if($row['date']) {
|
||||||
$timeline[] = array('date'=>$date, 'msg'=>'Version '.$row['version'].': Status change to '.$row['status'], 'type'=>'status_change', 'version'=>$row['version'], 'document'=>$this, 'status'=>$row['status'], 'params'=>array($row['version'], $row['status']));
|
$date = $row['date'];
|
||||||
|
$timeline[] = array('date'=>$date, 'msg'=>'Version '.$row['version'].': Status change to '.$row['status'], 'type'=>'status_change', 'version'=>$row['version'], 'document'=>$this, 'status'=>$row['status'], 'params'=>array($row['version'], $row['status']));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $timeline;
|
return $timeline;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -4415,7 +4421,7 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */
|
||||||
if (!is_integer($status)) {
|
if (!is_integer($status)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($status<-3 || $status>2) {
|
if ($status<-3 || $status>3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->_status = $status;
|
$this->_status = $status;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user