X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FField%2FChangedFieldItemList.php;h=2647129b926b391d3e02171d698b329271c1a957;hb=refs%2Fheads%2Fd864;hp=f781dc93b0dba0a059e81e025c0616916fb1cd41;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Field/ChangedFieldItemList.php b/web/core/lib/Drupal/Core/Field/ChangedFieldItemList.php index f781dc93b..2647129b9 100644 --- a/web/core/lib/Drupal/Core/Field/ChangedFieldItemList.php +++ b/web/core/lib/Drupal/Core/Field/ChangedFieldItemList.php @@ -18,4 +18,16 @@ class ChangedFieldItemList extends FieldItemList { return AccessResult::allowedIf($operation !== 'edit'); } + /** + * {@inheritdoc} + */ + public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode) { + // When saving entities in the user interface, the changed timestamp is + // automatically incremented by ContentEntityForm::submitForm() even if + // nothing was actually changed. Thus, the changed time needs to be + // ignored when determining whether there are any actual changes in the + // entity. + return FALSE; + } + }