From f27a41a12a5d2be53cca708df5671e7512184d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Sat, 31 Aug 2019 10:05:07 -0400 Subject: [PATCH] Attempt to prevent article term fixes from changing the updated time of all our articles --- scripts/article_type_term.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/article_type_term.php b/scripts/article_type_term.php index a6a2f18..2f6d802 100755 --- a/scripts/article_type_term.php +++ b/scripts/article_type_term.php @@ -95,6 +95,8 @@ function apply_term($term_id, $entity_ids) { if ($add_term == TRUE) { $entity_terms = array_merge($entity->get('field_article_type')->getValue(), [['target_id' => $term_id]]); $entity->set('field_article_type', $entity_terms); + // Prevent this cleanup from changing the updated time of all our articles. + $entity->setChangedTime($entity->getChangedTime()); $entity->save(); }