From de1e14307d7c59c0372118239716e4230eeb8b87 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 7 Nov 2013 17:28:49 +0000 Subject: [PATCH] Don't add parent in expanded children --- infolog/inc/class.infolog_ui.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 2641d24059..2af2cc03d3 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -378,7 +378,8 @@ class infolog_ui } $readonlys = $rows = array(); - if ($query['action_id']) + // Don't add parent in if info_id_parent (expanding to show subs) + if ($query['action_id'] && !$query['col_filter']['info_id_parent']) { $parents = $query['action'] == 'sp' && $query['action_id'] ? (array)$query['action_id'] : array(); if (count($parents) == 1 && is_array($query['action_id'])) @@ -403,7 +404,7 @@ class infolog_ui $info = $this->get_info($info,$readonlys,$query['action'],$query['action_id'],$query['filter2'],$details); } // for subs view ('sp') add parent(s) in front of subs once(!) - if ($parent_first && ($main = $this->bo->read($query['action_id'])) || + if ( $parent_first && ($main = $this->bo->read($query['action_id'])) || $parents && ($parent_index = array_search($info['info_id_parent'], $parents)) !== false && ($main = $this->bo->read($info['info_id_parent']))) {