From 15caf4b3f7eacda399a56b1ad8eeb9d3257306d9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Apr 2021 07:08:16 +0000 Subject: [PATCH 1/2] Fix: The "extid" field wasn't updated --- src/Model/Item.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Model/Item.php b/src/Model/Item.php index 4025ec4ffe..8867a2caa1 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -150,6 +150,10 @@ class Item return false; } + if (!empty($fields['extid']) && empty($fields['external-id'])) { + $fields['external-id'] = ItemURI::getIdByURI($fields['extid']); + } + if (!empty($fields['verb'])) { $fields['vid'] = Verb::getID($fields['verb']); } From a12992f0633b18a2a7f1ddcb27fc8508a3d12f75 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Apr 2021 09:57:08 +0000 Subject: [PATCH 2/2] Allow to remove the "extid" content as well. --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 8867a2caa1..32da545d86 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -150,7 +150,7 @@ class Item return false; } - if (!empty($fields['extid']) && empty($fields['external-id'])) { + if (isset($fields['extid'])) { $fields['external-id'] = ItemURI::getIdByURI($fields['extid']); }