diff --git a/core/modules/node/lib/Drupal/node/Plugin/Action/DemoteNode.php b/core/modules/node/lib/Drupal/node/Plugin/Action/DemoteNode.php index 2ea28b7..8adbdb1 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Action/DemoteNode.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Action/DemoteNode.php @@ -26,7 +26,7 @@ class DemoteNode extends ActionBase { * {@inheritdoc} */ public function execute($entity = NULL) { - $entity->setPromoted(TRUE); + $entity->setPromoted(FALSE); $entity->save(); } diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php index 0d24fa7..576cd5c 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php @@ -184,7 +184,7 @@ public function isPromoted() { * {@inheritdoc} */ public function setPromoted($promoted) { - $this->set('promoted', $promoted ? NODE_PROMOTED : NODE_NOT_PROMOTED); + $this->set('promote', $promoted ? NODE_PROMOTED : NODE_NOT_PROMOTED); return $this; } @@ -221,8 +221,7 @@ public function setPublished($published) { * {@inheritdoc} */ public function getAuthor() { - $entity = $this->get('uid')->entity; - return $entity; + return $this->get('uid')->entity; } /** @@ -259,8 +258,7 @@ public function setRevisionCreationTime($timestamp) { * {@inheritdoc} */ public function getRevisionAuthor() { - $entity = $this->get('revision_uid')->entity; - return $entity; + return $this->get('revision_uid')->entity; } /**