mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +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();
|
$jsondata = array();
|
||||||
if($user->isAdmin()) {
|
if($user->isAdmin()) {
|
||||||
$data = $document->getTimeline();
|
if($data = $document->getTimeline()) {
|
||||||
|
|
||||||
foreach($data as $i=>$item) {
|
foreach($data as $i=>$item) {
|
||||||
switch($item['type']) {
|
switch($item['type']) {
|
||||||
|
@ -182,6 +182,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
||||||
$d = makeTsFromLongDate($item['date']);
|
$d = makeTsFromLongDate($item['date']);
|
||||||
$jsondata[] = array('start'=>date('c', $d)/*$item['date']*/, 'content'=>$item['msg'], 'className'=>$classname);
|
$jsondata[] = array('start'=>date('c', $d)/*$item['date']*/, 'content'=>$item['msg'], 'className'=>$classname);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo json_encode($jsondata);
|
echo json_encode($jsondata);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user