Enable using knownUIDs and lastModification timestamp to avoid sending unchanged rows back to client

This commit is contained in:
Nathan Gray 2014-03-18 22:54:14 +00:00
parent aa3c0ca7c0
commit 4a5d906e48
3 changed files with 4 additions and 2 deletions

View File

@ -385,6 +385,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
$result['order'][] = $id;
// check if we need to send the data
//error_log("$id Known: " . (array_search($id, $knownUids) !== false ? 'Yes' : 'No') . ' Modified: ' . egw_time::to($row[$row_modified]) . ' > ' . egw_time::to($lastModified).'? ' . ($row[$row_modified] > $lastModified ? 'Yes' : 'No'));
if (!$row_id || !$knownUids || ($kUkey = array_search($id, $knownUids)) === false ||
!$lastModified || !isset($row[$row_modified]) || $row[$row_modified] > $lastModified)
{

View File

@ -811,6 +811,8 @@ var et2_dataview_controller = Class.extend({
},
_fetchCallback: function (_response) {
this.self._lastModification = _response.lastModification;
// Do nothing if _response.order evaluates to false
if (!_response.order)
{

View File

@ -109,9 +109,8 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
* Updates the filter instance.
*/
setFilters: function (_filters) {
// Update the filters, reset the "lastModification"
// Update the filters
this._filters = _filters;
this._lastModification = null;
},
/**