mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
check if $document->getTimeline() returns data
This commit is contained in:
parent
d9f25b5a3a
commit
b42be5971a
|
@ -155,7 +155,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
|
||||
$jsondata = array();
|
||||
if($user->isAdmin()) {
|
||||
$data = $document->getTimeline();
|
||||
if($data = $document->getTimeline()) {
|
||||
|
||||
foreach($data as $i=>$item) {
|
||||
switch($item['type']) {
|
||||
|
@ -182,6 +182,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
$d = makeTsFromLongDate($item['date']);
|
||||
$jsondata[] = array('start'=>date('c', $d)/*$item['date']*/, 'content'=>$item['msg'], 'className'=>$classname);
|
||||
}
|
||||
}
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($jsondata);
|
||||
|
|
Loading…
Reference in New Issue
Block a user