From be556fc1d7b4e7e69c94251285ab5524808582be Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 23 Apr 2019 09:44:53 -0600 Subject: [PATCH] Fix bug where editing custom status for one type lost statuses for other types --- infolog/inc/class.infolog_customfields.inc.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/infolog/inc/class.infolog_customfields.inc.php b/infolog/inc/class.infolog_customfields.inc.php index 1abc4287d6..5e5abfda55 100644 --- a/infolog/inc/class.infolog_customfields.inc.php +++ b/infolog/inc/class.infolog_customfields.inc.php @@ -248,6 +248,9 @@ class infolog_customfields extends admin_customfields { if($this->$key != $value) { + // NB: Statuses are monolithic - we can't record just the one type + // that was changed, or we loose the other types. All status must + // be recorded. $changed[$key] = $this->$key; } else @@ -255,14 +258,6 @@ class infolog_customfields extends admin_customfields unset($old[$key]); } } - foreach($changed['status'] as $type => $statuses) - { - if($old['status'][$type] == $statuses) - { - unset($old['status'][$type]); - unset($changed['status'][$type]); - } - } if($changed) { $cmd = new admin_cmd_config('infolog',$changed, $old);