mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
9d763b60a5
|
@ -4,6 +4,7 @@
|
|||
- fix lots of HTTP-Headers in op.Ajax.php (Closes: #233)
|
||||
- Timeline will be updated by ajax call, clicking on an item in the timeline
|
||||
will output some document information
|
||||
- Timeline now ends at end of the last day. Previously this day wasn't included
|
||||
- new attribute type 'date'
|
||||
- all dates are now in format 'yyyy-mm-dd'
|
||||
- fix fatal error when requesting new password
|
||||
|
|
|
@ -2200,9 +2200,8 @@ class SeedDMS_Core_DMS {
|
|||
|
||||
$queryStr = "SELECT document FROM tblDocumentContent WHERE date > ".$startts." AND date < ".$endts;
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
if ($resArr === false)
|
||||
return false;
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
foreach($resArr as $rec) {
|
||||
$document = $this->getDocument($rec['document']);
|
||||
$timeline = array_merge($timeline, $document->getTimeline());
|
||||
|
|
|
@ -35,17 +35,6 @@ if (!$user->isAdmin()) {
|
|||
}
|
||||
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
||||
|
||||
if(!empty($_GET['fromdate'])) {
|
||||
$from = makeTsFromLongDate($_GET['fromdate'].' 00:00:00');
|
||||
} else {
|
||||
$from = time()-7*86400;
|
||||
}
|
||||
if(!empty($_GET['todate'])) {
|
||||
$to = makeTsFromLongDate($_GET['todate'].' 23:59:59');
|
||||
} else {
|
||||
$to = time();
|
||||
}
|
||||
|
||||
if(isset($_GET['skip']))
|
||||
$skip = $_GET['skip'];
|
||||
else
|
||||
|
|
|
@ -82,28 +82,28 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
|
||||
if($todate) {
|
||||
$to = makeTsFromLongDate($todate.' 00:00:00');
|
||||
$to = makeTsFromLongDate($todate.' 23:59:59');
|
||||
} else {
|
||||
$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 $i=>$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 = '???';
|
||||
}
|
||||
$data[$i]['msg'] = $msg;
|
||||
}
|
||||
$item['msg'] = $msg;
|
||||
}
|
||||
|
||||
$jsondata = array();
|
||||
|
@ -144,7 +144,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
|
||||
if($todate) {
|
||||
$to = makeTsFromLongDate($todate.' 00:00:00');
|
||||
$to = makeTsFromLongDate($todate.' 23:59:59');
|
||||
} else {
|
||||
$to = time();
|
||||
}
|
||||
|
@ -206,7 +206,6 @@ echo "<div class=\"well\">\n";
|
|||
$(document).ready(function () {
|
||||
$('#update').click(function(ev){
|
||||
ev.preventDefault();
|
||||
console.log($('#form1').serialize());
|
||||
$.getJSON(
|
||||
'out.Timeline.php?action=data&' + $('#form1').serialize(),
|
||||
function(data) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user