Mercurial > hg > isophonics-drupal-site
diff core/modules/node/src/NodeStorage.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/node/src/NodeStorage.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/modules/node/src/NodeStorage.php Thu Feb 28 13:21:36 2019 +0000 @@ -19,7 +19,7 @@ */ public function revisionIds(NodeInterface $node) { return $this->database->query( - 'SELECT vid FROM {node_revision} WHERE nid=:nid ORDER BY vid', + 'SELECT vid FROM {' . $this->getRevisionTable() . '} WHERE nid=:nid ORDER BY vid', [':nid' => $node->id()] )->fetchCol(); } @@ -29,7 +29,7 @@ */ public function userRevisionIds(AccountInterface $account) { return $this->database->query( - 'SELECT vid FROM {node_field_revision} WHERE uid = :uid ORDER BY vid', + 'SELECT vid FROM {' . $this->getRevisionDataTable() . '} WHERE uid = :uid ORDER BY vid', [':uid' => $account->id()] )->fetchCol(); } @@ -38,14 +38,14 @@ * {@inheritdoc} */ public function countDefaultLanguageRevisions(NodeInterface $node) { - return $this->database->query('SELECT COUNT(*) FROM {node_field_revision} WHERE nid = :nid AND default_langcode = 1', [':nid' => $node->id()])->fetchField(); + return $this->database->query('SELECT COUNT(*) FROM {' . $this->getRevisionDataTable() . '} WHERE nid = :nid AND default_langcode = 1', [':nid' => $node->id()])->fetchField(); } /** * {@inheritdoc} */ public function updateType($old_type, $new_type) { - return $this->database->update('node') + return $this->database->update($this->getBaseTable()) ->fields(['type' => $new_type]) ->condition('type', $old_type) ->execute(); @@ -55,7 +55,7 @@ * {@inheritdoc} */ public function clearRevisionsLanguage(LanguageInterface $language) { - return $this->database->update('node_revision') + return $this->database->update($this->getRevisionTable()) ->fields(['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED]) ->condition('langcode', $language->getId()) ->execute();