X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FNodeStorage.php;fp=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FNodeStorage.php;h=2895f6cad88fb2f6f9b27013a2baa3fbdb64c8c0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=af85a067d991fb01f5d5e10820f6cbe66721b9f7;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/node/src/NodeStorage.php b/web/core/modules/node/src/NodeStorage.php index af85a067d..2895f6cad 100644 --- a/web/core/modules/node/src/NodeStorage.php +++ b/web/core/modules/node/src/NodeStorage.php @@ -19,7 +19,7 @@ class NodeStorage extends SqlContentEntityStorage implements NodeStorageInterfac */ 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 @@ class NodeStorage extends SqlContentEntityStorage implements NodeStorageInterfac */ 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 @@ class NodeStorage extends SqlContentEntityStorage implements NodeStorageInterfac * {@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 @@ class NodeStorage extends SqlContentEntityStorage implements NodeStorageInterfac * {@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();