Fix bug where editing custom status for one type lost statuses for other types

This commit is contained in:
nathangray 2019-04-23 09:44:53 -06:00
parent ff69b8abd7
commit be556fc1d7

View File

@ -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);