diff --cc core/modules/comment/config/schema/comment.schema.yml index 3b322b2,e30a37d..0000000 --- a/core/modules/comment/config/schema/comment.schema.yml +++ b/core/modules/comment/config/schema/comment.schema.yml @@@ -43,59 -43,6 +43,62 @@@ action.configuration.comment_unpublish_ type: action_configuration_default label: 'Unpublish comment configuration' - +field.comment.settings: + type: sequence + label: 'Settings' + sequence: + - type: string + label: 'Setting' + +field.comment.value: + type: sequence + label: 'Settings' + sequence: + - type: mapping + label: 'Settings' + mapping: + status: + type: integer + label: 'Status' + cid: + type: integer + label: 'Status' + last_comment_timestamp: + type: integer + label: 'Last comment timestamp' + last_comment_name: + type: integer + label: 'Name' + last_comment_uid: + type: integer + label: 'UID' + comment_count: + type: integer + label: 'Count' + +field.comment.instance_settings: + type: mapping + label: 'Comment settings' + mapping: + default_mode: + type: boolean + label: 'Threading' + per_page: + type: integer + label: 'Comments per page' + anonymous: + type: integer + label: 'Mode' + subject: + type: boolean + label: 'Allow comment title' + form_location: + type: boolean + label: ' Allow comment title' + preview: + type: integer + label: 'Preview comment' ++ + action.configuration.comment_delete_action: + type: action_configuration_default + label: 'Delete comment configuration' diff --cc core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php index efcd19e,6097c5a..0000000 --- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php +++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php @@@ -51,9 -52,16 +52,16 @@@ class CommentAdminOverview extends Form protected $moduleHandler; /** + * The tempstore factory. + * + * @var \Drupal\user\TempStoreFactory + */ + protected $tempStoreFactory; + + /** * Creates a CommentAdminOverview form. * - * @param \Drupal\Core\Entity\EntityManager $entity_manager + * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\comment\CommentStorageInterface $comment_storage * The comment storage. @@@ -61,8 -69,10 +69,10 @@@ * The date service. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. + * @param \Drupal\user\TempStoreFactory $temp_store_factory + * The tempstore factory. */ - public function __construct(EntityManagerInterface $entity_manager, CommentStorageInterface $comment_storage, Date $date, ModuleHandlerInterface $module_handler) { - public function __construct(EntityManager $entity_manager, CommentStorageInterface $comment_storage, Date $date, ModuleHandlerInterface $module_handler, TempStoreFactory $temp_store_factory) { ++ public function __construct(EntityManagerInterface $entity_manager, CommentStorageInterface $comment_storage, Date $date, ModuleHandlerInterface $module_handler, TempStoreFactory $temp_store_factory) { $this->entityManager = $entity_manager; $this->commentStorage = $comment_storage; $this->date = $date; diff --cc core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php index ce8aafe,4a329d0..0000000 --- a/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php +++ b/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php @@@ -11,7 -12,7 +12,8 @@@ use Drupal\user\TempStoreFactory use Drupal\Component\Utility\String; use Drupal\Core\Cache\Cache; use Drupal\Core\Form\ConfirmFormBase; +use Drupal\Core\Url; + use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@@ -118,14 -127,15 +126,15 @@@ class ConfirmDeleteMultiple extends Con * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - if ($form_state['values']['confirm']) { + if ($form_state['values']['confirm'] && !empty($this->comments)) { $this->commentStorage->delete($this->comments); - Cache::invalidateTags(array('content' => TRUE)); - $count = count($form_state['values']['comments']); + $this->tempStoreFactory->get('comment_multiple_delete_confirm')->delete(\Drupal::currentUser()->id()); + $count = count($this->comments); watchdog('content', 'Deleted @count comments.', array('@count' => $count)); - drupal_set_message(format_plural($count, 'Deleted 1 comment.', 'Deleted @count comments.')); + drupal_set_message($this->formatPlural($count, 'Deleted 1 comment.', 'Deleted @count comments.')); + Cache::invalidateTags(array('content' => TRUE)); } - $form_state['redirect_route']['route_name'] = 'comment.admin'; + $form_state['redirect_route'] = $this->getCancelRoute(); } } diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index 6e745dd..2e462f6 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -33,7 +33,6 @@ function node_views_data() { $data['node_field_data']['table']['group'] = t('Content'); $data['node_field_data']['table']['entity type'] = 'node'; $data['node_field_data']['table']['join']['node'] = array( - 'type' => 'INNER', 'left_field' => 'nid', 'field' => 'nid', );