check if getTimeLine() returns data

This commit is contained in:
Uwe Steinmann 2015-11-19 06:43:36 +01:00
parent 1532ba3b82
commit f5bf326605

View File

@ -87,8 +87,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
$to = time()-7*86400;
}
$data = $dms->getTimeline($from, $to);
if($data = $dms->getTimeline($from, $to)) {
foreach($data as &$item) {
switch($item['type']) {
case 'add_version':
@ -105,6 +104,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
}
$item['msg'] = $msg;
}
}
$jsondata = array();
foreach($data as $item) {