diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php index 7b884f7..51d4739 100644 --- a/core/lib/Drupal/Core/Database/Schema.php +++ b/core/lib/Drupal/Core/Database/Schema.php @@ -127,7 +127,6 @@ * 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'comment' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'promote' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'moderate' => array('type' => 'int', 'not null' => TRUE,'default' => 0), * 'sticky' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), * 'tnid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), @@ -137,7 +136,7 @@ * 'node_changed' => array('changed'), * 'node_created' => array('created'), * 'node_moderate' => array('moderate'), - * 'node_frontpage' => array('promote', 'status', 'sticky', 'created'), + * 'node_frontpage' => array('status', 'sticky', 'created'), * 'node_status_type' => array('status', 'type', 'nid'), * 'node_title_type' => array('title', array('type', 4)), * 'node_type' => array(array('type', 4)), diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php index 6450975..e01ae7b 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php @@ -137,7 +137,7 @@ function getFeedEditObject($feed_url = NULL, array $values = array()) { */ function getDefaultFeedItemCount() { // Our tests are based off of rss.xml, so let's find out how many elements should be related. - $feed_count = db_query_range('SELECT COUNT(DISTINCT nid) FROM {node_field_data} n WHERE n.promote = 1 AND n.status = 1', 0, config('system.rss')->get('items.limit'))->fetchField(); + $feed_count = db_query_range('SELECT COUNT(DISTINCT nid) FROM {node_field_data} n WHERE n.status = 1', 0, config('system.rss')->get('items.limit'))->fetchField(); return $feed_count > 10 ? 10 : $feed_count; } diff --git a/core/modules/book/book.install b/core/modules/book/book.install index 7d70a02..663552e 100644 --- a/core/modules/book/book.install +++ b/core/modules/book/book.install @@ -42,7 +42,6 @@ function _book_install_type_create() { $book_node_type = node_type_set_defaults($book_node_type); node_type_save($book_node_type); node_add_body_field($book_node_type); - // Default to not promoted. variable_set('node_options_book', array('status')); } diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php index 8d7a472..d3e2466 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php @@ -126,21 +126,21 @@ function testCommentInterface() { $this->assertText(t('The comment you are replying to does not exist.'), 'Replying to an unpublished comment'); // Attempt to post to node with comments disabled. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_HIDDEN)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'comment' => COMMENT_NODE_HIDDEN)); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/' . $this->node->nid); $this->assertText('This discussion is closed', 'Posting to node with comments disabled'); $this->assertNoField('edit-comment', 'Comment body field found.'); // Attempt to post to node with read-only comments. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_CLOSED)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'comment' => COMMENT_NODE_CLOSED)); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/' . $this->node->nid); $this->assertText('This discussion is closed', 'Posting to node with comments read-only'); $this->assertNoField('edit-comment', 'Comment body field found.'); // Attempt to post to node with comments enabled (check field names etc). - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_OPEN)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'comment' => COMMENT_NODE_OPEN)); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/' . $this->node->nid); $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled'); diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php index e121432..5e81170 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php @@ -38,7 +38,7 @@ public function testCommentNewCommentsIndicator() { // Test if the right links are displayed when no comment is present for the // node. $this->drupalLogin($this->admin_user); - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_OPEN)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'comment' => COMMENT_NODE_OPEN)); $this->drupalGet('node'); $this->assertNoLink(t('@count comments', array('@count' => 0))); $this->assertNoLink(t('@count new comments', array('@count' => 0))); diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php index 644001c..64bf1d2 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php @@ -31,7 +31,7 @@ function testCommentPaging() { $this->setCommentPreview(DRUPAL_DISABLED); // Create a node and three comments. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $comments = array(); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); @@ -107,7 +107,7 @@ function testCommentOrderingThreading() { $this->setCommentsPerPage(1000); // Create a node and three comments. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $comments = array(); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); @@ -207,7 +207,7 @@ function testCommentNewPageIndicator() { $this->setCommentsPerPage(1); // Create a node and three comments. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $comments = array(); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE); diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php index 22132c1..6b1d168 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php @@ -75,7 +75,7 @@ function setUp() { )); // Create a test node authored by the web user. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->uid)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'uid' => $this->web_user->uid)); } /** diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php index 3636f91..1fba77c 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php @@ -36,7 +36,7 @@ function testCommentThreading() { // Create a node. $this->drupalLogin($this->web_user); - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->uid)); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'uid' => $this->web_user->uid)); // Post comment #1. $this->drupalLogin($this->web_user); diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php index c4f38e9..71dd21d 100644 --- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php +++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php @@ -53,9 +53,9 @@ function testDifferentPermissions() { // - An article, which should be user-editable. // - A page, which should not be user-editable. // - A second article, which should also be user-editable. - $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); - $node2 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); - $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node1 = $this->drupalCreateNode(array('type' => 'article')); + $node2 = $this->drupalCreateNode(array('type' => 'page')); + $node3 = $this->drupalCreateNode(array('type' => 'article')); // Now, on the front page, all article nodes should have contextual links // placeholders, as should the view that contains them. diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php index a3b86ea..f3f444e 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php @@ -57,9 +57,8 @@ function testFileFieldRSSContent() { $edit = array("fields[$field_name][type]" => 'file_rss_enclosure'); $this->drupalPost(NULL, $edit, t('Save')); - // Create a new node with a file field set. Promote to frontpage - // needs to be set so this node will appear in the RSS feed. - $node = $this->drupalCreateNode(array('type' => $type_name, 'promote' => 1)); + // Create a new node with a file field set. + $node = $this->drupalCreateNode(array('type' => $type_name)); $test_file = $this->getTestFile('text'); // Create a new node with the uploaded file. diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php index 9b3eea0..3b5a9a1 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php @@ -71,7 +71,7 @@ function setUp() { */ function testDisableFilterModule() { // Create a new node. - $node = $this->drupalCreateNode(array('promote' => 1)); + $node = $this->drupalCreateNode(); $body_raw = $node->body[Language::LANGCODE_NOT_SPECIFIED][0]['value']; $format_id = $node->body[Language::LANGCODE_NOT_SPECIFIED][0]['format']; $this->drupalGet('node/' . $node->nid); diff --git a/core/modules/forum/forum.install b/core/modules/forum/forum.install index 9f16099..ea65ae4 100644 --- a/core/modules/forum/forum.install +++ b/core/modules/forum/forum.install @@ -12,7 +12,7 @@ function forum_install() { // Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module. module_set_weight('forum', 1); // Forum topics are published by default, but do not have any other default - // options set (for example, they are not promoted to the front page). + // options set. // @todo Convert to default module configuration, once Node module's content // types are converted. variable_set('node_options_forum', array('status')); diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php index c28b1dc..f9e2b8e 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php @@ -204,7 +204,7 @@ function testForum() { // Test loading multiple forum nodes on the front page. $this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content', 'post comments'))); - $this->drupalPost('admin/structure/types/manage/forum', array('node_options[promote]' => 'promote'), t('Save content type')); + $this->drupalPost('admin/structure/types/manage/forum', array(), t('Save content type')); $this->createForumTopic($this->forum, FALSE); $this->createForumTopic($this->forum, FALSE); $this->drupalGet('node'); diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php index c55927f..ec4e641 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php @@ -178,7 +178,6 @@ function testContentTypeDirLang() { $nodes[$langcode] = $this->drupalCreateNode(array( 'langcode' => $langcode, 'type' => $type->type, - 'promote' => NODE_PROMOTED, )); } diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php index 77b27c8..2264cb3 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php @@ -119,8 +119,8 @@ function testPathLanguageConfiguration() { $this->container->get('path.crud')->delete($edit); // Create language nodes to check priority of aliases. - $first_node = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); - $second_node = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); + $first_node = $this->drupalCreateNode(array('type' => 'page')); + $second_node = $this->drupalCreateNode(array('type' => 'page')); // Assign a custom path alias to the first node with the English language. $edit = array( diff --git a/core/modules/node/config/views.view.frontpage.yml b/core/modules/node/config/views.view.frontpage.yml index 9ef450f..d402fae 100644 --- a/core/modules/node/config/views.view.frontpage.yml +++ b/core/modules/node/config/views.view.frontpage.yml @@ -58,42 +58,6 @@ display: sort_asc_label: Asc sort_desc_label: Desc filters: - promote: - admin_label: '' - expose: - description: '' - identifier: '' - label: '' - multiple: '0' - operator: '' - operator_id: '0' - remember: '0' - remember_roles: - authenticated: authenticated - required: '0' - use_operator: '0' - exposed: '0' - field: promote - group: '1' - group_info: - default_group: All - default_group_multiple: { } - description: '' - group_items: { } - identifier: '' - label: '' - multiple: '0' - optional: '1' - remember: '0' - widget: select - group_type: group - id: promote - is_grouped: '0' - operator: '=' - relationship: none - table: node_field_data - value: '1' - plugin_id: boolean status: expose: operator: '0' diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc index 156576b..3da9c43 100644 --- a/core/modules/node/content_types.inc +++ b/core/modules/node/content_types.inc @@ -195,10 +195,9 @@ function node_type_form($form, &$form_state, $type = NULL) { ); $form['workflow']['node_options'] = array('#type' => 'checkboxes', '#title' => t('Default options'), - '#default_value' => variable_get('node_options_' . $type->type, array('status', 'promote')), + '#default_value' => variable_get('node_options_' . $type->type, array('status')), '#options' => array( 'status' => t('Published'), - 'promote' => t('Promoted to front page'), 'sticky' => t('Sticky at top of lists'), 'revision' => t('Create new revision'), ), diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index e64db93..7895910 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -28,10 +28,10 @@ class NodeFormController extends EntityFormController { protected function prepareEntity() { $node = $this->entity; // Set up default values, if required. - $node_options = variable_get('node_options_' . $node->type, array('status', 'promote')); + $node_options = variable_get('node_options_' . $node->type, array('status')); // If this is a new node, fill in the default values. if (!isset($node->nid) || isset($node->is_new)) { - foreach (array('status', 'promote', 'sticky') as $key) { + foreach (array('status', 'sticky') as $key) { // Multistep node forms might have filled in something already. if (!isset($node->$key)) { $node->$key = (int) in_array($key, $node_options); @@ -212,12 +212,6 @@ public function form(array $form, array &$form_state) { '#weight' => 95, ); - $form['options']['promote'] = array( - '#type' => 'checkbox', - '#title' => t('Promoted to front page'), - '#default_value' => $node->promote, - ); - $form['options']['sticky'] = array( '#type' => 'checkbox', '#title' => t('Sticky at top of lists'), diff --git a/core/modules/node/lib/Drupal/node/NodeStorageController.php b/core/modules/node/lib/Drupal/node/NodeStorageController.php index 524036b..5cc5a22 100644 --- a/core/modules/node/lib/Drupal/node/NodeStorageController.php +++ b/core/modules/node/lib/Drupal/node/NodeStorageController.php @@ -182,11 +182,6 @@ public function baseFieldDefinitions() { 'description' => t('Whether comments are allowed on this node: 0 = no, 1 = closed (read only), 2 = open (read/write).'), 'type' => 'integer_field', ); - $properties['promote'] = array( - 'label' => t('Promote'), - 'description' => t('A boolean indicating whether the node should be displayed on the front page.'), - 'type' => 'boolean_field', - ); $properties['sticky'] = array( 'label' => t('Sticky'), 'description' => t('A boolean indicating whether the node should be displayed at the top of lists in which it appears.'), 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 0791287..c92d189 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 @@ -144,16 +144,6 @@ class Node extends EntityNG implements NodeInterface { public $comment; /** - * The node promotion status. - * - * Promoted nodes should be displayed on the front page of the site. The value - * is either NODE_PROMOTED or NODE_NOT_PROMOTED. - * - * @var \Drupal\Core\Entity\Field\FieldInterface - */ - public $promote; - - /** * The node sticky status. * * Sticky nodes should be displayed at the top of lists in which they appear. @@ -219,7 +209,6 @@ protected function init() { unset($this->created); unset($this->changed); unset($this->comment); - unset($this->promote); unset($this->sticky); unset($this->tnid); unset($this->translate); diff --git a/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php b/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php index 65e3aec..a4e336a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php @@ -66,12 +66,10 @@ function testMultiStepNodeFormBasicOptions() { $edit = array( 'title' => 'a', - 'promote' => FALSE, 'sticky' => 1, "{$this->field_name}[$langcode][0][value]" => $this->randomString(32), ); $this->drupalPost('node/add/page', $edit, t('Add another item')); - $this->assertNoFieldChecked('edit-promote', 'promote stayed unchecked'); $this->assertFieldChecked('edit-sticky', 'sticky stayed checked'); } diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php index e2b4c07..09179d6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php @@ -41,9 +41,9 @@ function testNodeAccessRecords() { $this->assertEqual($records[0]->realm, 'test_article_realm', 'Grant with article_realm acquired for node without alteration.'); $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.'); - // Create an unpromoted "Basic page" node. - $node2 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0)); - $this->assertTrue(node_load($node2->nid), 'Unpromoted basic page node created.'); + // Create a "Basic page" node. + $node2 = $this->drupalCreateNode(array('type' => 'page')); + $this->assertTrue(node_load($node2->nid), 'Basic page node created.'); // Check to see if grants added by node_test_node_access_records made it in. $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node2->nid))->fetchAll(); @@ -51,9 +51,9 @@ function testNodeAccessRecords() { $this->assertEqual($records[0]->realm, 'test_page_realm', 'Grant with page_realm acquired for node without alteration.'); $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.'); - // Create an unpromoted, unpublished "Basic page" node. - $node3 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0, 'status' => 0)); - $this->assertTrue(node_load($node3->nid), 'Unpromoted, unpublished basic page node created.'); + // Create an unpublished "Basic page" node. + $node3 = $this->drupalCreateNode(array('type' => 'page', 'status' => 0)); + $this->assertTrue(node_load($node3->nid), 'Unpublished basic page node created.'); // Check to see if grants added by node_test_node_access_records made it in. $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node3->nid))->fetchAll(); @@ -61,17 +61,6 @@ function testNodeAccessRecords() { $this->assertEqual($records[0]->realm, 'test_page_realm', 'Grant with page_realm acquired for node without alteration.'); $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.'); - // Create a promoted "Basic page" node. - $node4 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); - $this->assertTrue(node_load($node4->nid), 'Promoted basic page node created.'); - - // Check to see if grant added by node_test_node_access_records was altered - // by node_test_node_access_records_alter. - $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node4->nid))->fetchAll(); - $this->assertEqual(count($records), 1, 'Returned the correct number of rows.'); - $this->assertEqual($records[0]->realm, 'test_alter_realm', 'Altered grant with alter_realm acquired for node.'); - $this->assertEqual($records[0]->gid, 2, 'Altered grant with gid = 2 acquired for node.'); - // Check to see if we can alter grants with hook_node_grants_alter(). $operations = array('view', 'update', 'delete'); // Create a user that is allowed to access content. @@ -85,8 +74,8 @@ function testNodeAccessRecords() { // Check that core does not grant access to an unpublished node when an // empty $grants array is returned. - $node6 = $this->drupalCreateNode(array('status' => 0, 'disable_node_access' => TRUE)); - $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node6->nid))->fetchAll(); + $node4 = $this->drupalCreateNode(array('status' => 0, 'disable_node_access' => TRUE)); + $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node4->nid))->fetchAll(); $this->assertEqual(count($records), 0, 'Returned no records for unpublished node.'); } } diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFormButtonsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeFormButtonsTest.php index a2bd56c..730fbc0 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFormButtonsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFormButtonsTest.php @@ -108,7 +108,7 @@ function testNodeFormButtons() { // Set article content type default to unpublished. This will change the // the initial order of buttons and/or status of the node when creating // a node. - variable_set('node_options_article', array('promote')); + variable_set('node_options_article', array()); $this->refreshVariables(); // Verify the buttons on a node add form for an administrator. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php index ad37c69..41e6c21 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php @@ -37,12 +37,12 @@ function setUp() { * Creates four nodes and ensures that they are loaded correctly. */ function testNodeMultipleLoad() { - $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); - $node2 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); - $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 0)); - $node4 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0)); + $node1 = $this->drupalCreateNode(array('type' => 'article', 'status' => 1)); + $node2 = $this->drupalCreateNode(array('type' => 'article', 'status' => 1)); + $node3 = $this->drupalCreateNode(array('type' => 'article', 'status' => 0)); + $node4 = $this->drupalCreateNode(array('type' => 'page', 'status' => 0)); - // Confirm that promoted nodes appear in the default node listing. + // Confirm that published nodes appear in the default node listing. $this->drupalGet('node'); $this->assertText($node1->label(), 'Node title appears on the default listing.'); $this->assertText($node2->label(), 'Node title appears on the default listing.'); @@ -50,7 +50,7 @@ function testNodeMultipleLoad() { $this->assertNoText($node4->label(), 'Node title does not appear in the default listing.'); // Load nodes with only a condition. Nodes 3 and 4 will be loaded. - $nodes = entity_load_multiple_by_properties('node', array('promote' => 0)); + $nodes = entity_load_multiple_by_properties('node', array('status' => 0)); $this->assertEqual($node3->label(), $nodes[$node3->nid]->label(), 'Node was loaded.'); $this->assertEqual($node4->label(), $nodes[$node4->nid]->label(), 'Node was loaded.'); $count = count($nodes); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php index 34b35ae..3829bf2 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php @@ -46,7 +46,7 @@ function setUp() { */ function testNodeRSSContent() { // Create a node. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $this->drupalGet('rss.xml'); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php index e03e4b0..d8013dd 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php @@ -41,10 +41,8 @@ function setUp() { */ function testNodeTitle() { // Create "Basic page" content with title. - // Add the node to the frontpage so we can test if teaser links are clickable. $settings = array( 'title' => $this->randomName(8), - 'promote' => 1, ); $node = $this->drupalCreateNode($settings); diff --git a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php index e627c6e..7837743 100644 --- a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php @@ -26,7 +26,6 @@ function testSummaryLength() { // Create a node to view. $settings = array( 'body' => array(array('value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero. Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci. Curabitur feugiat egestas nisl sed accumsan.')), - 'promote' => 1, ); $node = $this->drupalCreateNode($settings); $this->assertTrue(node_load($node->nid), 'Node created.'); diff --git a/core/modules/node/lib/Drupal/node/Tests/Views/FrontpageTest.php b/core/modules/node/lib/Drupal/node/Tests/Views/FrontpageTest.php index f638dbe..bf2ae3c 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Views/FrontpageTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Views/FrontpageTest.php @@ -68,7 +68,6 @@ public function testFrontPage() { $values = array(); $values['type'] = 'article'; $values['title'] = $this->randomName(); - $values['promote'] = TRUE; $values['status'] = TRUE; // Test descending sort order. $values['created'] = REQUEST_TIME - $i; @@ -88,27 +87,17 @@ public function testFrontPage() { } } - // Create some nodes which aren't on the frontpage, either because they - // aren't promoted or because they aren't published. + // Create some nodes which aren't on the frontpage because they aren't + // published. $not_expected_nids = array(); $values = array(); - $values['type'] = 'article'; - $values['title'] = $this->randomName(); - $values['status'] = TRUE; - $values['promote'] = FALSE; - $node = $this->nodeStorageController->create($values); - $node->save(); - $not_expected_nids[] = $node->id(); - - $values['promote'] = TRUE; $values['status'] = FALSE; $values['title'] = $this->randomName(); $node = $this->nodeStorageController->create($values); $node->save(); $not_expected_nids[] = $node->id(); - $values['promote'] = TRUE; $values['sticky'] = TRUE; $values['status'] = FALSE; $values['title'] = $this->randomName(); diff --git a/core/modules/node/node.install b/core/modules/node/node.install index a0a71ff..0709480 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -157,12 +157,6 @@ function node_schema() { 'not null' => TRUE, 'default' => 0, ), - 'promote' => array( - 'description' => 'Boolean indicating whether the node translation should be displayed on the front page.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), 'sticky' => array( 'description' => 'Boolean indicating whether the node translation should be displayed at the top of lists in which it appears.', 'type' => 'int', @@ -175,7 +169,7 @@ function node_schema() { 'node_created' => array('created'), 'node_default_langcode' => array('default_langcode'), 'node_langcode' => array('langcode'), - 'node_frontpage' => array('promote', 'status', 'sticky', 'created'), + 'node_frontpage' => array('status', 'sticky', 'created'), 'node_status_type' => array('status', 'type', 'nid'), 'node_title_type' => array('title', array('type', 4)), 'node_type' => array(array('type', 4)), @@ -281,12 +275,6 @@ function node_schema() { 'not null' => TRUE, 'default' => 0, ), - 'promote' => array( - 'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed on the front page.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), 'sticky' => array( 'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed at the top of lists in which it appears.', 'type' => 'int', @@ -526,7 +514,6 @@ function node_uninstall() { // Delete node search ranking variables. variable_del('node_rank_relevance'); variable_del('node_rank_sticky'); - variable_del('node_rank_promote'); variable_del('node_rank_recent'); // Delete remaining general module variables. @@ -920,12 +907,6 @@ function _node_update_8016_schema() { 'not null' => TRUE, 'default' => 0, ), - 'promote' => array( - 'description' => 'Boolean indicating whether the node translation should be displayed on the front page.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), 'sticky' => array( 'description' => 'Boolean indicating whether the node translation should be displayed at the top of lists in which it appears.', 'type' => 'int', @@ -936,7 +917,7 @@ function _node_update_8016_schema() { 'indexes' => array( 'node_changed' => array('changed'), 'node_created' => array('created'), - 'node_frontpage' => array('promote', 'status', 'sticky', 'created'), + 'node_frontpage' => array('status', 'sticky', 'created'), 'node_status_type' => array('status', 'type', 'nid'), 'node_title_type' => array('title', array('type', 4)), 'node_type' => array(array('type', 4)), @@ -1042,12 +1023,6 @@ function _node_update_8016_schema() { 'not null' => TRUE, 'default' => 0, ), - 'promote' => array( - 'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed on the front page.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), 'sticky' => array( 'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed at the top of lists in which it appears.', 'type' => 'int', @@ -1138,7 +1113,7 @@ function node_update_8018() { foreach ($indexes as $index) { db_drop_index('node', $index); } - $fields = array('title', 'uid', 'status', 'created', 'changed', 'comment', 'promote', 'sticky'); + $fields = array('title', 'uid', 'status', 'created', 'changed', 'comment', 'sticky'); foreach ($fields as $field) { db_drop_field('node', $field); } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index fbdf07d..b33beeb 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -33,16 +33,6 @@ const NODE_PUBLISHED = 1; /** - * Denotes that the node is not promoted to the front page. - */ -const NODE_NOT_PROMOTED = 0; - -/** - * Denotes that the node is promoted to the front page. - */ -const NODE_PROMOTED = 1; - -/** * Denotes that the node is not sticky at the top of the page. */ const NODE_NOT_STICKY = 0; @@ -109,7 +99,7 @@ function node_help($path, $arg) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating content') . '
'; - $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('@content-type' => url('admin/structure/types'))) . '
'; + $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('@content-type' => url('admin/structure/types'))) . '
'; $output .= '
' . t('Creating custom content types') . '
'; $output .= '
' . t('The Node module gives users with the Administer content types permission the ability to create new content types in addition to the default ones already configured. Creating custom content types allows you the flexibility to add fields and configure default settings that suit the differing needs of various site content.', array('@content-new' => url('admin/structure/types/add'), '@field' => url('admin/help/field'))) . '
'; $output .= '
' . t('Administering content') . '
'; @@ -1091,9 +1081,6 @@ function template_preprocess_node(&$variables) { // Gather node classes. $variables['attributes']['class'][] = 'node'; $variables['attributes']['class'][] = drupal_html_class('node-' . $node->type); - if ($node->promote) { - $variables['attributes']['class'][] = 'promoted'; - } if ($node->sticky) { $variables['attributes']['class'][] = 'sticky'; } @@ -1336,11 +1323,6 @@ function node_ranking() { // The sticky flag is either 0 or 1, which is automatically normalized. 'score' => 'n.sticky', ), - 'promote' => array( - 'title' => t('Content is promoted to the front page'), - // The promote flag is either 0 or 1, which is automatically normalized. - 'score' => 'n.promote', - ), ); // Add relevance based on creation or changed date. @@ -1580,7 +1562,7 @@ function node_menu() { $items['admin/structure/types'] = array( 'title' => 'Content types', - 'description' => 'Manage content types, including default status, front page promotion, comment settings, etc.', + 'description' => 'Manage content types, including default status, comment settings, etc.', 'page callback' => 'node_overview_types', 'access arguments' => array('administer content types'), 'file' => 'content_types.inc', @@ -2012,7 +1994,6 @@ function node_feed($nids = FALSE, $channel = array()) { $nids = db_select('node_field_data', 'n') ->distinct() ->fields('n', array('nid')) - ->condition('n.promote', 1) ->condition('n.status', 1) ->orderBy('n.created', 'DESC') ->range(0, $rss_config->get('items.limit')) diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index a731f40..2919913 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -168,7 +168,7 @@ function theme_node_preview($variables) { // Do we need to preview trimmed version of post as well as full version? if ($trimmed != $full) { - drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.')); + drupal_set_message(t('The trimmed version of your post shows what your post looks like when exported for syndication. You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.')); $output .= '

' . t('Preview trimmed version') . '

'; $output .= $trimmed; $output .= '

' . t('Preview full version') . '

'; diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index b4b34eb..bf84d82 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -159,25 +159,6 @@ function node_views_data() { ), ); - $data['node_field_data']['promote'] = array( - 'title' => t('Promoted to front page status'), - 'help' => t('Whether or not the content is promoted to the front page.'), - 'field' => array( - 'id' => 'boolean', - 'output formats' => array( - 'promoted-notpromoted' => array(t('Promoted'), t('Not promoted')), - ), - ), - 'filter' => array( - 'id' => 'boolean', - 'label' => t('Promoted to front page status'), - 'type' => 'yes-no', - ), - 'sort' => array( - 'id' => 'standard', - ), - ); - $data['node_field_data']['sticky'] = array( 'title' => t('Sticky status'), 'help' => t('Whether or not the content is sticky.'), diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index ad12811..dd242d4 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -10,7 +10,6 @@ * - created: Formatted creation date. Preprocess functions can reformat it by * calling format_date() with the desired parameters on * $variables['node']->created. - * - promote: Whether the node is promoted to the front page. * - sticky: Whether the node is 'sticky'. Sticky nodes are ordered above * other non-sticky nodes in teaser listings * - status: Whether the node is published. @@ -46,7 +45,6 @@ * would result in: "view-mode-teaser", and full: "view-mode-full". * - preview: Whether a node is in preview mode. * The following are controlled through the node publishing options. - * - promoted: Appears on nodes promoted to the front page. * - sticky: Appears on nodes ordered above other non-sticky nodes in teaser * listings. * - unpublished: Appears on unpublished nodes visible only to site admins. diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module index 12e0eed..6ba41a4 100644 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ b/core/modules/node/tests/modules/node_test/node_test.module @@ -109,7 +109,7 @@ function node_test_node_access_records_alter(&$grants, EntityInterface $node) { if (!empty($grants)) { foreach ($grants as $key => $grant) { // Alter grant from test_page_realm to test_alter_realm and modify the gid. - if ($grant['realm'] == 'test_page_realm' && $node->promote) { + if ($grant['realm'] == 'test_page_realm') { $grants[$key]['realm'] = 'test_alter_realm'; $grants[$key]['gid'] = 2; } diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php index 82eb211..bb5b0f5 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php @@ -148,7 +148,7 @@ function testAttributesInMarkupFile() { "files[" . $image_field . "_" . $langcode . "_0]" => drupal_realpath($image->uri)); // Create node and save, then edit node to upload files. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); // Prepares filenames for lookup in RDF graph. diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php index 29c69cb..e5887c8 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/UserAttributesTest.php @@ -81,7 +81,7 @@ function testUserAttributesInMarkup() { // User 2 creates a node. $this->drupalLogin($user2); - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node = $this->drupalCreateNode(array('type' => 'article')); $this->drupalLogin($user1); // Parses the user profile page where the default bundle mapping for user diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php index e85dcd6..dc1ad50 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php @@ -31,7 +31,7 @@ function testRankings() { $this->drupalLogin($this->drupalCreateUser(array('post comments', 'skip comment approval', 'create page content'))); // Build a list of the rankings to test. - $node_ranks = array('sticky', 'promote', 'relevance', 'recent', 'comments', 'views'); + $node_ranks = array('sticky', 'relevance', 'recent', 'comments', 'views'); // Create nodes for testing. foreach ($node_ranks as $node_rank) { @@ -44,7 +44,6 @@ function testRankings() { if ($num == 1) { switch ($node_rank) { case 'sticky': - case 'promote': $settings[$node_rank] = 1; break; case 'relevance': @@ -150,7 +149,7 @@ function testHTMLRankings() { $this->refreshVariables(); // Disable all other rankings. - $node_ranks = array('sticky', 'promote', 'recent', 'comments', 'views'); + $node_ranks = array('sticky', 'recent', 'comments', 'views'); foreach ($node_ranks as $node_rank) { variable_set('node_rank_' . $node_rank, 0); } @@ -220,7 +219,7 @@ function testDoubleRankings() { // Set up for ranking sticky and lots of comments; make sure others are // disabled. - $node_ranks = array('sticky', 'promote', 'relevance', 'recent', 'comments', 'views'); + $node_ranks = array('sticky', 'relevance', 'recent', 'comments', 'views'); foreach ($node_ranks as $var) { $value = ($var == 'sticky' || $var == 'comments') ? 10 : 0; variable_set('node_rank_' . $var, $value); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 8c46872..1c63c88 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -222,7 +222,6 @@ function drupalGetNodeByTitle($title, $reset = FALSE) { * - title: Random string. * - comment: COMMENT_NODE_OPEN. * - changed: REQUEST_TIME. - * - promote: NODE_NOT_PROMOTED. * - log: Empty string. * - status: NODE_PUBLISHED. * - sticky: NODE_NOT_STICKY. @@ -241,7 +240,6 @@ protected function drupalCreateNode(array $settings = array()) { 'body' => array(array()), 'title' => $this->randomName(8), 'changed' => REQUEST_TIME, - 'promote' => NODE_NOT_PROMOTED, 'revision' => 1, 'log' => '', 'status' => NODE_PUBLISHED, diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php index 57d9353..577e461 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php @@ -140,7 +140,6 @@ function testRenderInlineFullPage() { 'format' => $php_format_id, ), ), - 'promote' => 1, ); $node = $this->drupalCreateNode($settings); diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php index 3649529..927e217 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php @@ -139,7 +139,6 @@ public function testCommentHooks() { 'title' => 'Test node', 'status' => 1, 'comment' => 2, - 'promote' => 0, 'sticky' => 0, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, 'created' => REQUEST_TIME, @@ -282,7 +281,6 @@ public function testNodeHooks() { 'title' => 'Test node', 'status' => 1, 'comment' => 2, - 'promote' => 0, 'sticky' => 0, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, 'created' => REQUEST_TIME, diff --git a/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php b/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php index bbc3fb1..777885f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php @@ -35,7 +35,7 @@ function setUp() { // Create admin user, log in admin user, and create one node. $this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration')); $this->drupalLogin($this->admin_user); - $this->node_path = "node/" . $this->drupalCreateNode(array('promote' => 1))->nid; + $this->node_path = "node/" . $this->drupalCreateNode()->nid; // Configure 'node' as front page. config('system.site')->set('page.front', 'node')->save(); diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php index ba4bca5..9417b41 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php @@ -101,7 +101,6 @@ function setUp() { $this->node = $this->drupalCreateNode(array( 'title' => $this->xss_label, 'type' => 'article', - 'promote' => NODE_PROMOTED, 'field_tags' => array(array('target_id' => $this->term->id())), )); diff --git a/core/modules/system/tests/upgrade/drupal-7.field.database.php b/core/modules/system/tests/upgrade/drupal-7.field.database.php index 74f69fb..3748d95 100644 --- a/core/modules/system/tests/upgrade/drupal-7.field.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.field.database.php @@ -68,7 +68,6 @@ 'created' => '1262754000', 'changed' => '1338795201', 'comment' => '0', - 'promote' => '1', 'sticky' => '0', 'tnid' => '0', 'translate' => '0', @@ -84,7 +83,6 @@ 'timestamp' => '1338795201', 'status' => '1', 'comment' => '0', - 'promote' => '1', 'sticky' => '0', )) ->execute(); diff --git a/core/modules/system/tests/upgrade/drupal-7.language.database.php b/core/modules/system/tests/upgrade/drupal-7.language.database.php index 5ecf769..00d2f4e 100644 --- a/core/modules/system/tests/upgrade/drupal-7.language.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.language.database.php @@ -437,7 +437,6 @@ 'created', 'changed', 'comment', - 'promote', 'sticky', 'tnid', 'translate', @@ -453,7 +452,6 @@ 'created' => '1263769200', 'changed' => '1314997642', 'comment' => '2', - 'promote' => '0', 'sticky' => '0', 'tnid' => '0', 'translate' => '0', @@ -469,7 +467,6 @@ 'created' => '1263769300', 'changed' => '1263769300', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', 'tnid' => '0', 'translate' => '0', @@ -485,7 +482,6 @@ 'created' => '1263769534', 'changed' => '1263769534', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', 'tnid' => '52', 'translate' => '0', @@ -501,7 +497,6 @@ 'created' => '1263770064', 'changed' => '1263770064', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', 'tnid' => '52', 'translate' => '0', @@ -537,7 +532,6 @@ 'timestamp', 'status', 'comment', - 'promote', 'sticky', )) ->values(array( @@ -549,7 +543,6 @@ 'timestamp' => '1314997642', 'status' => '1', 'comment' => '2', - 'promote' => '0', 'sticky' => '0', )) ->values(array( @@ -561,7 +554,6 @@ 'timestamp' => '1263769300', 'status' => '1', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', )) ->values(array( @@ -573,7 +565,6 @@ 'timestamp' => '1263769534', 'status' => '1', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', )) ->values(array( @@ -585,7 +576,6 @@ 'timestamp' => '1263770064', 'status' => '1', 'comment' => '0', - 'promote' => '0', 'sticky' => '0', )) ->execute(); diff --git a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php index cdbff1a..f428586 100644 --- a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php @@ -89,10 +89,6 @@ protected function setUp() { $values = array('created' => $time, 'type' => 'page'); $values[$this->field_name][]['target_id'] = $term->id(); - // Make every other node promoted. - if ($i % 2) { - $values['promote'] = TRUE; - } $values['body'][]['value'] = l('Node ' . 1, 'node/' . 1); $node = $this->drupalCreateNode($values); diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php index 272868c..54f317e 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -46,7 +46,7 @@ public function setUp() { // Create 10 nodes. for ($i = 0; $i <= 10; $i++) { - $this->drupalCreateNode(array('promote' => TRUE)); + $this->drupalCreateNode(); } } diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 0075ebd..2c503f4 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -82,7 +82,7 @@ function standard_install() { rdf_mapping_save($rdf_mapping); } - // Default "Basic page" to not be promoted and have comments disabled. + // Default "Basic page" to have comments disabled. variable_set('node_options_page', array('status')); variable_set('comment_page', COMMENT_NODE_HIDDEN); diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig index d8af3d5..dd26407 100644 --- a/core/themes/bartik/templates/node.html.twig +++ b/core/themes/bartik/templates/node.html.twig @@ -10,7 +10,6 @@ * - created: Formatted creation date. Preprocess functions can reformat it by * calling format_date() with the desired parameters on * $variables['node']->created. - * - promote: Whether the node is promoted to the front page. * - sticky: Whether the node is 'sticky'. Sticky nodes are ordered above * other non-sticky nodes in teaser listings * - status: Whether the node is published. @@ -46,7 +45,6 @@ * would result in: "view-mode-teaser", and full: "view-mode-full". * - preview: Whether a node is in preview mode. * The following are controlled through the node publishing options. - * - promoted: Appears on nodes promoted to the front page. * - sticky: Appears on nodes ordered above other non-sticky nodes in teaser * listings. * - unpublished: Appears on unpublished nodes visible only to site admins.