From 871a4eec3a4f3746150c8631f8548984ee17308b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 10 Feb 2015 08:05:20 +0000 Subject: [PATCH] backport of r51645: When changing the nextmatch row template, dont query the database right away since re-initializing the nextmatch controller forces another query --- infolog/inc/class.infolog_ui.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 3864e8987b..5af5852ccb 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -387,6 +387,7 @@ class infolog_ui } // check if we have a custom, type-specific template + $old_template = $query['template']; $query['template'] = 'infolog.index.rows'; unset($query['custom_fields']); if ($query['col_filter']['info_type']) @@ -404,6 +405,9 @@ class infolog_ui $query['col_filter']['info_status'] = ''; } } + // Template change forces the UI to do a full update first, no point in getting rows right now + if($old_template != $query['template']) return 0; + // do we need to read the custom fields, depends on the column is enabled and customfields exist, prefs are filter specific // so we have to check that as well $details = $query['filter2'] == 'all';