diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index 0debf71..bb25d4b 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -736,7 +736,7 @@ function comment_update_8008(&$sandbox) { /** * Remove the comment_block_count variable. */ -function comment_update_8005() { +function comment_update_8009() { variable_del('comment_block_count'); } diff --git a/core/modules/comment/config/views.view.comments_recent.yml b/core/modules/comment/config/views.view.comments_recent.yml index 0fbd95c..214d5c0 100644 --- a/core/modules/comment/config/views.view.comments_recent.yml +++ b/core/modules/comment/config/views.view.comments_recent.yml @@ -2,20 +2,21 @@ base_field: cid base_table: comment core: 8.x description: '' -status: '1' +status: true display: block_1: display_plugin: block id: block_1 display_title: Block - position: '' + position: 0 display_options: block_description: 'Recent comments' + block_category: Comment default: display_plugin: default id: default display_title: Master - position: '' + position: 1 display_options: access: type: perm @@ -30,33 +31,33 @@ display: pager: type: some options: - items_per_page: '10' - offset: '0' + items_per_page: 10 + offset: 0 style: type: html_list options: grouping: { } row_class: '' - default_row_class: '1' - row_class_special: '1' + default_row_class: true + row_class_special: true type: ul wrapper_class: item-list class: '' row: type: fields options: - default_field_elements: '1' + default_field_elements: true inline: subject: subject changed: changed separator: ' ' - hide_empty: '0' + hide_empty: false relationships: - nid: - id: nid + node: + field: node + id: node table: comment - field: nid - required: '1' + required: true plugin_id: standard fields: subject: @@ -68,48 +69,48 @@ display: group_type: group admin_label: '' label: '' - exclude: '0' + exclude: false alter: - alter_text: '0' + alter_text: false text: '' - make_link: '0' + make_link: false path: '' - absolute: '0' - external: '0' - replace_spaces: '0' + absolute: false + external: false + replace_spaces: false path_case: none - trim_whitespace: '0' + trim_whitespace: false alt: '' rel: '' link_class: '' prefix: '' suffix: '' target: '' - nl2br: '0' + nl2br: false max_length: '' - word_boundary: '0' - ellipsis: '0' - more_link: '0' + word_boundary: false + ellipsis: false + more_link: false more_link_text: '' more_link_path: '' - strip_tags: '0' - trim: '0' + strip_tags: false + trim: false preserve_tags: '' - html: '0' + html: false element_type: '' element_class: '' element_label_type: '' element_label_class: '' - element_label_colon: '0' + element_label_colon: false element_wrapper_type: '' element_wrapper_class: '' - element_default_classes: '1' + element_default_classes: true empty: '' - hide_empty: '0' - empty_zero: '0' - hide_alter_empty: '1' - link_to_comment: '1' - link_to_node: '0' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_comment: true + link_to_node: false changed: id: changed table: comment @@ -119,69 +120,69 @@ display: group_type: group admin_label: '' label: '' - exclude: '0' + exclude: false alter: - alter_text: '0' + alter_text: false text: '' - make_link: '0' + make_link: false path: '' - absolute: '0' - external: '0' - replace_spaces: '0' + absolute: false + external: false + replace_spaces: false path_case: none - trim_whitespace: '0' + trim_whitespace: false alt: '' rel: '' link_class: '' prefix: '' suffix: '' target: '' - nl2br: '0' + nl2br: false max_length: '' - word_boundary: '1' - ellipsis: '1' - more_link: '0' + word_boundary: true + ellipsis: true + more_link: false more_link_text: '' more_link_path: '' - strip_tags: '0' - trim: '0' + strip_tags: false + trim: false preserve_tags: '' - html: '0' + html: false element_type: '' element_class: '' element_label_type: '' element_label_class: '' - element_label_colon: '0' + element_label_colon: false element_wrapper_type: '' element_wrapper_class: '' - element_default_classes: '1' + element_default_classes: true empty: '' - hide_empty: '0' - empty_zero: '0' - hide_alter_empty: '1' + hide_empty: false + empty_zero: false + hide_alter_empty: true date_format: 'time ago' custom_date_format: '' timezone: '' filters: status: - value: '1' + value: true table: comment field: status id: status plugin_id: boolean expose: - operator: '0' - group: '1' + operator: false + group: 1 status_node: - value: '1' + value: true table: node_field_data field: status - relationship: nid + relationship: node id: status_node plugin_id: boolean expose: - operator: '0' - group: '1' + operator: false + group: 1 sorts: cid: id: cid @@ -191,7 +192,7 @@ display: group_type: group admin_label: '' order: DESC - exposed: '0' + exposed: false expose: label: '' plugin_id: standard @@ -205,12 +206,12 @@ display: group_type: group admin_label: '' label: '' - empty: '1' + empty: true content: 'No comments available.' - tokenize: '0' + tokenize: false plugin_id: text_custom label: 'Recent comments' module: views id: comments_recent -tag: 'default' +tag: default langcode: en diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php deleted file mode 100644 index 10358ae..0000000 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php +++ /dev/null @@ -1,70 +0,0 @@ - 10, - ); - } - - /** - * Overrides \Drupal\block\BlockBase::access(). - */ - public function access() { - return user_access('access comments'); - } - - /** - * Overrides \Drupal\block\BlockBase::blockForm(). - */ - public function blockForm($form, &$form_state) { - $form['block_count'] = array( - '#type' => 'select', - '#title' => t('Number of recent comments'), - '#default_value' => $this->configuration['block_count'], - '#options' => drupal_map_assoc(array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 30)), - ); - return $form; - } - - /** - * Overrides \Drupal\block\BlockBase::blockSubmit(). - */ - public function blockSubmit($form, &$form_state) { - $this->configuration['block_count'] = $form_state['values']['block_count']; - } - - /** - * {@inheritdoc} - */ - public function build() { - return array( - '#theme' => 'comment_block', - '#number' => $this->configuration['block_count'], - ); - } - -}