mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
check if getTimeLine() returns data
This commit is contained in:
parent
1532ba3b82
commit
f5bf326605
|
@ -87,23 +87,23 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
|||
$to = time()-7*86400;
|
||||
}
|
||||
|
||||
$data = $dms->getTimeline($from, $to);
|
||||
|
||||
foreach($data as &$item) {
|
||||
switch($item['type']) {
|
||||
case 'add_version':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
||||
break;
|
||||
case 'add_file':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
||||
break;
|
||||
case 'status_change':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||
break;
|
||||
default:
|
||||
$msg = '???';
|
||||
if($data = $dms->getTimeline($from, $to)) {
|
||||
foreach($data as &$item) {
|
||||
switch($item['type']) {
|
||||
case 'add_version':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
||||
break;
|
||||
case 'add_file':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
||||
break;
|
||||
case 'status_change':
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||
break;
|
||||
default:
|
||||
$msg = '???';
|
||||
}
|
||||
$item['msg'] = $msg;
|
||||
}
|
||||
$item['msg'] = $msg;
|
||||
}
|
||||
|
||||
$jsondata = array();
|
||||
|
|
Loading…
Reference in New Issue
Block a user