From 065fa2f78dbc95a2dacfc7ab847f941abf22298a Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 24 Jun 2019 11:35:30 -0600 Subject: [PATCH] * Admin - Fix deleting custom field from list's context menu changed the modified date on all fields --- admin/inc/class.admin_customfields.inc.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/admin/inc/class.admin_customfields.inc.php b/admin/inc/class.admin_customfields.inc.php index 27f21be336..3b05906a3f 100644 --- a/admin/inc/class.admin_customfields.inc.php +++ b/admin/inc/class.admin_customfields.inc.php @@ -170,11 +170,7 @@ class admin_customfields unset($content['content_types']['create']); unset($content['content_types']['name']); } - // No common type change and type didn't change, try an update - elseif($this->content_type && is_array($content) && $this->content_type == $content['old_content_type']) - { - $this->update($content); - } + // No common type change and type didn't change, do nothing } // Custom field deleted from nextmatch @@ -192,10 +188,10 @@ class admin_customfields ); $cmd->run(); unset($this->fields[$name]); + + Framework::refresh_opener('Deleted', 'admin', $data['id'] /* Conflicts with Api\Accounts 'delete'*/); } } - // save changes to repository - $this->save_repository(); } $content['nm']= Api\Cache::getSession('admin', 'customfield-index'); @@ -650,8 +646,6 @@ class admin_customfields $config->read_repository(); $config->value('types',$this->content_types); $config->save_repository(); - - Api\Storage\Customfields::save($this->appname, $this->fields); } /**