diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 4b2a7939a5..689ff02152 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -580,9 +580,10 @@ var et2_nextmatch = /** @class */ (function (_super) { if (type === void 0) { type = "add"; } var index = 0; var appname = this._get_appname(); - if (appname && this.egw().window.app[appname] && typeof this.egw().window.app[appname].nm_refresh_index == "function") { + var app_obj = this.getInstanceManager().app_obj[appname] || this.egw().window.app[appname]; + if (appname && app_obj && typeof app_obj.nm_refresh_index == "function") { var sort = Object.values(this.controller._indexMap).map(function (e) { return ({ index: e.idx, uid: e.uid }); }); - index = this.egw().window.app[appname].nm_refresh_index(this, uid, sort, type); + index = this.getInstanceManager().app_obj[appname].nm_refresh_index(this, uid, sort, type); } // App cancelled the add if (index === false) { diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 20813f0eb5..0ef541fb1e 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -863,10 +863,11 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 { let index : boolean | number = 0; let appname = this._get_appname(); - if(appname && this.egw().window.app[appname] && typeof this.egw().window.app[appname].nm_refresh_index == "function") + let app_obj = this.getInstanceManager().app_obj[appname] || this.egw().window.app[appname]; + if(appname && app_obj && typeof app_obj.nm_refresh_index == "function") { let sort = Object.values(this.controller._indexMap).map(e => ({index:e.idx, uid:e.uid})); - index = this.egw().window.app[appname].nm_refresh_index(this, uid, sort, type) + index = this.getInstanceManager().app_obj[appname].nm_refresh_index(this, uid, sort, type) } // App cancelled the add diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 2efd333310..fe8309dd00 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -605,6 +605,10 @@ var et2_nextmatch_controller = /** @class */ (function (_super) { this.egw.dataFetch(this._widget.getInstanceManager().etemplate_exec_id || this._execId, _queriedRange, obj._filters, this._widgetId, _callback, _context); }; et2_nextmatch_controller.prototype.dataRegisterUID = function (_uid, _callback, _context) { + // Make sure we use correct prefix when data comes back + if (this._widget && this._widget._get_appname() != this.egw.getAppName()) { + _context.prefix = _uid.split('::')[0]; + } this.egw.dataRegisterUID(_uid, _callback, _context, this._widget.getInstanceManager().etemplate_exec_id || this._execId, this._widgetId); }; et2_nextmatch_controller.prototype.dataUnregisterUID = function () { diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.ts b/api/js/etemplate/et2_extension_nextmatch_controller.ts index 0d86d99da5..36c884ec01 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.ts +++ b/api/js/etemplate/et2_extension_nextmatch_controller.ts @@ -755,6 +755,11 @@ export class et2_nextmatch_controller extends et2_dataview_controller implements dataRegisterUID( _uid, _callback, _context) { + // Make sure we use correct prefix when data comes back + if(this._widget && this._widget._get_appname() != this.egw.getAppName()) + { + _context.prefix = _uid.split('::')[0]; + } this.egw.dataRegisterUID(_uid, _callback, _context, this._widget.getInstanceManager().etemplate_exec_id || this._execId, this._widgetId diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index f359bcae10..9c419c32d0 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -353,6 +353,14 @@ class infolog_ui $links['linked'] = array(); unset($query['col_filter']['linked']); } + + // Querying for a particular ID. If linked is a list of IDs, reset the linked or we won't find the ID we want. + if($query['col_filter']['info_id'] && $link_filters['linked'] && !$link_filters['linked']['app']) + { + unset($links['linked']); + unset($link_filters['linked']); + } + if($query['action'] && in_array($query['action'], array_keys($GLOBALS['egw_info']['apps'])) && $query['action_id']) { $link_filters['action'] = array('app'=>$query['action'], 'id' => $query['action_id']); @@ -558,7 +566,7 @@ class infolog_ui * @param $rows * @return int */ - public function link_filters(&$links, $link_filters, &$query, &$rows) + public function link_filters(&$links, $link_filters, &$query, &$rows) { foreach($link_filters as $key => $link) { @@ -592,6 +600,10 @@ class infolog_ui } } + if($query['col_filter']['info_id']) + { + $links['info_id'] = $query['col_filter']['info_id']; + } if(count($links)) { $query['col_filter']['info_id'] = count($links) > 1 ? call_user_func_array('array_intersect', $links) : $links[$key];