Commit 04d7c2bf authored by Neil Drumm's avatar Neil Drumm 👋
Browse files

Issue #3281747 by drumm, greggles, mlhess: Refresh /security page

parent 3a060caa
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2649,7 +2649,7 @@ function drupalorg_preprocess_page(&$variables) {

  // Reset drupalorg_crosssite_preprocess_page() overrides.
  if ($reset_breadcrumb || $context || $router['path'] === 'group/node/%/admin/content'
    || (isset($variables['node']) && in_array($variables['node']->type, ['casestudy', 'event', 'contributor_role', 'contributor_skill', 'contributor_task', 'organization', 'project_release']))
    || (isset($variables['node']) && in_array($variables['node']->type, ['casestudy', 'event', 'contributor_role', 'contributor_skill', 'contributor_task', 'organization', 'project_release', 'sa']))
    || drupalorg_set_section() === 'community') {
    $variables['section_name'] = '';
    unset($variables['breadcrumb']);
@@ -4782,6 +4782,8 @@ function drupalorg_node_view($node, $view_mode = 'full') {
    drupal_set_breadcrumb($breadcrumb);
  }
  elseif ($node->type === 'sa') {
    drupal_set_breadcrumb([l(t('Security advisories'), 'security')]);

    if ($wrapper->field_is_psa->value() == 1) {
      // Hide project & vulnerability type for PSAs.
      hide($node->content['field_project']);
+174 −23
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ function drupalorg_security_advisories_views_default_views() {
  $handler->display->display_options['pager']['type'] = 'full';
  $handler->display->display_options['style_plugin'] = 'default';
  $handler->display->display_options['row_plugin'] = 'node';
  /* Header: Global: Text area */
  $handler->display->display_options['header']['text']['id'] = 'text';
  $handler->display->display_options['header']['text']['table'] = 'views';
  $handler->display->display_options['header']['text']['field'] = 'area';
  $handler->display->display_options['header']['text']['empty'] = TRUE;
  $handler->display->display_options['header']['text']['content'] = 'These posts by the Drupal security team are also sent to the security announcements email list.';
  $handler->display->display_options['header']['text']['format'] = '1';
  /* Field: Content: Title */
  $handler->display->display_options['fields']['title']['id'] = 'title';
  $handler->display->display_options['fields']['title']['table'] = 'node';
@@ -67,6 +60,10 @@ function drupalorg_security_advisories_views_default_views() {
    0 => '1852',
  );
  $handler->display->display_options['filters']['term_node_tid_depth']['group'] = 1;
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator_id'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['label'] = 'Has taxonomy terms (with depth)';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['identifier'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['vocabulary'] = 'vocabulary_1';
  $handler->display->display_options['filters']['term_node_tid_depth']['depth'] = '0';
  /* Filter criterion: Content: Published */
@@ -107,13 +104,22 @@ function drupalorg_security_advisories_views_default_views() {
  );
  $handler->display->display_options['filters']['field_project_target_id']['group'] = 2;

  /* Display: Page */
  $handler = $view->new_display('page', 'Page', 'page_1');
  /* Display: Core page */
  $handler = $view->new_display('page', 'Core page', 'page_1');
  $handler->display->display_options['defaults']['title'] = FALSE;
  $handler->display->display_options['title'] = 'Security advisories for Drupal core';
  $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  $handler->display->display_options['path'] = 'security';
  $handler->display->display_options['defaults']['header'] = FALSE;
  /* Header: Global: Text area */
  $handler->display->display_options['header']['area']['id'] = 'area';
  $handler->display->display_options['header']['area']['table'] = 'views';
  $handler->display->display_options['header']['area']['field'] = 'area';
  $handler->display->display_options['header']['area']['content'] = 'Show advisories for <a href="/security/contrib">only contributed projects</a>, <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>, or <a href="/security">all security advisories</a>';
  $handler->display->display_options['header']['area']['format'] = '1';
  $handler->display->display_options['path'] = 'security/core';

  /* Display: Feed */
  $handler = $view->new_display('feed', 'Feed', 'feed_1');
  /* Display: Core feed */
  $handler = $view->new_display('feed', 'Core feed', 'feed_1');
  $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'some';
  $handler->display->display_options['pager']['options']['items_per_page'] = '20';
@@ -169,8 +175,8 @@ function drupalorg_security_advisories_views_default_views() {
  $handler->display->display_options['fields']['created']['date_format'] = 'long';
  $handler->display->display_options['fields']['created']['second_date_format'] = 'long';

  /* Display: Block - All advisories */
  $handler = $view->new_display('block', 'Block - All advisories', 'security_all');
  /* Display: All block */
  $handler = $view->new_display('block', 'All block', 'security_all');
  $handler->display->display_options['defaults']['title'] = FALSE;
  $handler->display->display_options['title'] = 'All security advisories and announcements';
  $handler->display->display_options['display_description'] = 'This block contains Core, Contrib and PSA';
@@ -276,6 +282,139 @@ function drupalorg_security_advisories_views_default_views() {
  $handler->display->display_options['filters']['status_1']['field'] = 'status';
  $handler->display->display_options['filters']['status_1']['value'] = '1';
  $handler->display->display_options['filters']['status_1']['group'] = 2;

  /* Display: All page */
  $handler = $view->new_display('page', 'All page', 'page_2');
  $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  $handler->display->display_options['defaults']['header'] = FALSE;
  /* Header: Global: Text area */
  $handler->display->display_options['header']['area']['id'] = 'area';
  $handler->display->display_options['header']['area']['table'] = 'views';
  $handler->display->display_options['header']['area']['field'] = 'area';
  $handler->display->display_options['header']['area']['content'] = 'Show advisories for <a href="/security/core">only Drupal Core</a>, <a href="/security/contrib">only contributed projects</a>, or <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>';
  $handler->display->display_options['header']['area']['format'] = '1';
  $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  $handler->display->display_options['filter_groups']['operator'] = 'OR';
  $handler->display->display_options['filter_groups']['groups'] = array(
    1 => 'AND',
    2 => 'AND',
  );
  $handler->display->display_options['defaults']['filters'] = FALSE;
  /* Filter criterion: Content: Has taxonomy terms (with depth) */
  $handler->display->display_options['filters']['term_node_tid_depth']['id'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['table'] = 'node';
  $handler->display->display_options['filters']['term_node_tid_depth']['field'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['value'] = array(
    0 => '44',
    1 => '1852',
  );
  $handler->display->display_options['filters']['term_node_tid_depth']['group'] = 1;
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator_id'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['label'] = 'Has taxonomy terms (with depth)';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['identifier'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['remember_roles'] = array(
    2 => '2',
    3 => 0,
    1 => 0,
    39 => 0,
    36 => 0,
    7 => 0,
    34 => 0,
    32 => 0,
    22 => 0,
    20 => 0,
    24 => 0,
    41 => 0,
    28 => 0,
    26 => 0,
    14 => 0,
    38 => 0,
    4 => 0,
    42 => 0,
  );
  $handler->display->display_options['filters']['term_node_tid_depth']['vocabulary'] = 'vocabulary_1';
  $handler->display->display_options['filters']['term_node_tid_depth']['depth'] = '0';
  /* Filter criterion: Content: Published */
  $handler->display->display_options['filters']['status']['id'] = 'status';
  $handler->display->display_options['filters']['status']['table'] = 'node';
  $handler->display->display_options['filters']['status']['field'] = 'status';
  $handler->display->display_options['filters']['status']['value'] = '1';
  $handler->display->display_options['filters']['status']['group'] = 1;
  /* Filter criterion: Content: Type */
  $handler->display->display_options['filters']['type']['id'] = 'type';
  $handler->display->display_options['filters']['type']['table'] = 'node';
  $handler->display->display_options['filters']['type']['field'] = 'type';
  $handler->display->display_options['filters']['type']['value'] = array(
    'sa' => 'sa',
  );
  $handler->display->display_options['filters']['type']['group'] = 2;
  /* Filter criterion: Content: Published */
  $handler->display->display_options['filters']['status_1']['id'] = 'status_1';
  $handler->display->display_options['filters']['status_1']['table'] = 'node';
  $handler->display->display_options['filters']['status_1']['field'] = 'status';
  $handler->display->display_options['filters']['status_1']['value'] = '1';
  $handler->display->display_options['filters']['status_1']['group'] = 2;
  $handler->display->display_options['path'] = 'security';

  /* Display: All feed */
  $handler = $view->new_display('feed', 'All feed', 'feed_2');
  $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'some';
  $handler->display->display_options['pager']['options']['items_per_page'] = '20';
  $handler->display->display_options['pager']['options']['offset'] = '0';
  $handler->display->display_options['style_plugin'] = 'rss';
  $handler->display->display_options['row_plugin'] = 'node_rss';
  $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  $handler->display->display_options['filter_groups']['operator'] = 'OR';
  $handler->display->display_options['filter_groups']['groups'] = array(
    1 => 'AND',
    2 => 'AND',
  );
  $handler->display->display_options['defaults']['filters'] = FALSE;
  /* Filter criterion: Content: Has taxonomy terms (with depth) */
  $handler->display->display_options['filters']['term_node_tid_depth']['id'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['table'] = 'node';
  $handler->display->display_options['filters']['term_node_tid_depth']['field'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['value'] = array(
    0 => '44',
    1 => '1852',
  );
  $handler->display->display_options['filters']['term_node_tid_depth']['group'] = 1;
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator_id'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['label'] = 'Has taxonomy terms (with depth)';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['operator'] = 'term_node_tid_depth_op';
  $handler->display->display_options['filters']['term_node_tid_depth']['expose']['identifier'] = 'term_node_tid_depth';
  $handler->display->display_options['filters']['term_node_tid_depth']['vocabulary'] = 'vocabulary_1';
  $handler->display->display_options['filters']['term_node_tid_depth']['depth'] = '0';
  /* Filter criterion: Content: Published */
  $handler->display->display_options['filters']['status']['id'] = 'status';
  $handler->display->display_options['filters']['status']['table'] = 'node';
  $handler->display->display_options['filters']['status']['field'] = 'status';
  $handler->display->display_options['filters']['status']['value'] = '1';
  $handler->display->display_options['filters']['status']['group'] = 1;
  /* Filter criterion: Content: Type */
  $handler->display->display_options['filters']['type']['id'] = 'type';
  $handler->display->display_options['filters']['type']['table'] = 'node';
  $handler->display->display_options['filters']['type']['field'] = 'type';
  $handler->display->display_options['filters']['type']['value'] = array(
    'sa' => 'sa',
  );
  $handler->display->display_options['filters']['type']['group'] = 2;
  /* Filter criterion: Content: Published */
  $handler->display->display_options['filters']['status_1']['id'] = 'status_1';
  $handler->display->display_options['filters']['status_1']['table'] = 'node';
  $handler->display->display_options['filters']['status_1']['field'] = 'status';
  $handler->display->display_options['filters']['status_1']['value'] = '1';
  $handler->display->display_options['filters']['status_1']['group'] = 2;
  $handler->display->display_options['path'] = 'security/all/rss.xml';
  $handler->display->display_options['displays'] = array(
    'page_2' => 'page_2',
    'default' => 0,
    'page_1' => 0,
    'security_core' => 0,
    'security_all' => 0,
  );
  $translatables['drupalorg_security_announcements'] = array(
    t('Defaults'),
    t('Security advisories'),
@@ -292,18 +431,22 @@ function drupalorg_security_advisories_views_default_views() {
    t('‹ previous'),
    t('next ›'),
    t('last »'),
    t('These posts by the Drupal security team are also sent to the security announcements email list.'),
    t('Title'),
    t('Updated date'),
    t('Page'),
    t('Feed'),
    t('Has taxonomy terms (with depth)'),
    t('Core page'),
    t('Security advisories for Drupal core'),
    t('Show advisories for <a href="/security/contrib">only contributed projects</a>, <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>, or <a href="/security">all security advisories</a>'),
    t('Core feed'),
    t('Block'),
    t('Security Advisories for Drupal Core'),
    t('More Security Advisories'),
    t('Block - All advisories'),
    t('All block'),
    t('All security advisories and announcements'),
    t('This block contains Core, Contrib and PSA'),
    t('Has taxonomy terms (with depth)'),
    t('All page'),
    t('Show advisories for <a href="/security/core">only Drupal Core</a>, <a href="/security/contrib">only contributed projects</a>, or <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>'),
    t('All feed'),
  );
  $export['drupalorg_security_announcements'] = $view;

@@ -337,7 +480,9 @@ function drupalorg_security_advisories_views_default_views() {
  $handler->display->display_options['header']['text']['table'] = 'views';
  $handler->display->display_options['header']['text']['field'] = 'area';
  $handler->display->display_options['header']['text']['empty'] = TRUE;
  $handler->display->display_options['header']['text']['content'] = 'Security advisories for third-party projects that are not part of Drupal core - this includes all modules, themes, and installation profiles that have been contributed by a community member. These posts by the Drupal security team are also sent to the security announcements email list.';
  $handler->display->display_options['header']['text']['content'] = 'Show advisories for <a href="/security/core">only Drupal core</a>, <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>, or <a href="/security">all security advisories</a>

Security advisories for third-party projects that are not part of Drupal core - this includes all modules, themes, and installation profiles that have been contributed by community members.';
  $handler->display->display_options['header']['text']['format'] = '1';
  /* Sort criterion: Content: Post date */
  $handler->display->display_options['sorts']['created']['id'] = 'created';
@@ -476,7 +621,9 @@ function drupalorg_security_advisories_views_default_views() {
    t('‹ previous'),
    t('next ›'),
    t('last »'),
    t('Security advisories for third-party projects that are not part of Drupal core - this includes all modules, themes, and installation profiles that have been contributed by a community member. These posts by the Drupal security team are also sent to the security announcements email list.'),
    t('Show advisories for <a href="/security/core">only Drupal core</a>, <a href="/security/psa">only <abbr title="Public Service Announcements">PSAs</abbr></a>, or <a href="/security">all security advisories</a>

Security advisories for third-party projects that are not part of Drupal core - this includes all modules, themes, and installation profiles that have been contributed by community members.'),
    t('Page'),
    t('Feed'),
    t('Block'),
@@ -515,7 +662,9 @@ function drupalorg_security_advisories_views_default_views() {
  $handler->display->display_options['header']['text']['table'] = 'views';
  $handler->display->display_options['header']['text']['field'] = 'area';
  $handler->display->display_options['header']['text']['empty'] = TRUE;
  $handler->display->display_options['header']['text']['content'] = 'Security-related announcements, such as information on best practices. These posts by the Drupal security team are also sent to the security announcements email list.';
  $handler->display->display_options['header']['text']['content'] = 'Show advisories for <a href="/security/core">only Drupal core</a>, <a href="/security/contrib">only contributed projects</a>, or <a href="/security">all security advisories</a>

Security-related announcements, such as information on best practices.';
  $handler->display->display_options['header']['text']['format'] = '1';
  /* Sort criterion: Content: Post date */
  $handler->display->display_options['sorts']['created']['id'] = 'created';
@@ -623,7 +772,9 @@ function drupalorg_security_advisories_views_default_views() {
    t('‹ previous'),
    t('next ›'),
    t('last »'),
    t('Security-related announcements, such as information on best practices. These posts by the Drupal security team are also sent to the security announcements email list.'),
    t('Show advisories for <a href="/security/core">only Drupal core</a>, <a href="/security/contrib">only contributed projects</a>, or <a href="/security">all security advisories</a>

Security-related announcements, such as information on best practices.'),
    t('Page'),
    t('Feed'),
    t('Block'),