From 4a5308123a94be9e94e8a2923e97a59fcc259f08 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Wed, 31 Jan 2024 08:22:19 +1000
Subject: [PATCH] Issue #3410210 by quietone, sourabhjain, smustgrave, Spokje,
 catch: Remove statistics module from comments

---
 autoload.php                                      |  1 -
 .../Scaffold/GenerateAutoloadReferenceFile.php    |  1 -
 core/assets/scaffold/files/default.settings.php   | 15 +++++++--------
 core/lib/Drupal/Core/Render/Element/Link.php      |  7 -------
 .../tracker.tracking_changed_content.html.twig    |  1 -
 sites/default/default.settings.php                | 15 +++++++--------
 6 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/autoload.php b/autoload.php
index 1e5ad34e3ba8..477f243b2135 100644
--- a/autoload.php
+++ b/autoload.php
@@ -8,7 +8,6 @@
  * @see index.php
  * @see core/install.php
  * @see core/rebuild.php
- * @see core/modules/statistics/statistics.php
  */
 
 return require __DIR__ . '/vendor/autoload.php';
diff --git a/composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php b/composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php
index 4a576388262c..6123a838ab3e 100644
--- a/composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php
+++ b/composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php
@@ -113,7 +113,6 @@ protected static function autoLoadContents($relative_autoload_path) {
  * @see index.php
  * @see core/install.php
  * @see core/rebuild.php
- * @see core/modules/statistics/statistics.php
  */
 
 return require __DIR__ . '/{$relative_autoload_path}';
diff --git a/core/assets/scaffold/files/default.settings.php b/core/assets/scaffold/files/default.settings.php
index 63fb2df74a1b..98b25a83581d 100644
--- a/core/assets/scaffold/files/default.settings.php
+++ b/core/assets/scaffold/files/default.settings.php
@@ -355,14 +355,13 @@
  * security, or encryption benefits. In an environment where Drupal
  * is behind a reverse proxy, the real IP address of the client should
  * be determined such that the correct client IP address is available
- * to Drupal's logging, statistics, and access management systems. In
- * the most simple scenario, the proxy server will add an
- * X-Forwarded-For header to the request that contains the client IP
- * address. However, HTTP headers are vulnerable to spoofing, where a
- * malicious client could bypass restrictions by setting the
- * X-Forwarded-For header directly. Therefore, Drupal's proxy
- * configuration requires the IP addresses of all remote proxies to be
- * specified in $settings['reverse_proxy_addresses'] to work correctly.
+ * to Drupal's logging and access management systems. In the most simple
+ * scenario, the proxy server will add an X-Forwarded-For header to the request
+ * that contains the client IP address. However, HTTP headers are vulnerable to
+ * spoofing, where a malicious client could bypass restrictions by setting the
+ * X-Forwarded-For header directly. Therefore, Drupal's proxy configuration
+ * requires the IP addresses of all remote proxies to be specified in
+ * $settings['reverse_proxy_addresses'] to work correctly.
  *
  * Enable this setting to get Drupal to determine the client IP from the
  * X-Forwarded-For header. If you are unsure about this setting, do not have a
diff --git a/core/lib/Drupal/Core/Render/Element/Link.php b/core/lib/Drupal/Core/Render/Element/Link.php
index b84a1b6ab5a4..ea2c35f46b9f 100644
--- a/core/lib/Drupal/Core/Render/Element/Link.php
+++ b/core/lib/Drupal/Core/Render/Element/Link.php
@@ -136,13 +136,6 @@ public static function preRenderLink($element) {
    *       // passing in to links.html.twig.
    *     ),
    *   ),
-   *   'statistics' => array(
-   *     '#theme' => 'links__node__statistics',
-   *     '#links' => array(
-   *       // An array of links associated with node statistics, suitable for
-   *       // passing in to links.html.twig.
-   *     ),
-   *   ),
    *   'translation' => array(
    *     '#theme' => 'links__node__translation',
    *     '#links' => array(
diff --git a/core/modules/tracker/help_topics/tracker.tracking_changed_content.html.twig b/core/modules/tracker/help_topics/tracker.tracking_changed_content.html.twig
index 957e40040592..7dfc73067257 100644
--- a/core/modules/tracker/help_topics/tracker.tracking_changed_content.html.twig
+++ b/core/modules/tracker/help_topics/tracker.tracking_changed_content.html.twig
@@ -2,7 +2,6 @@
 label: 'Viewing lists of recently-updated content'
 related:
   - core.tracking_content
-  - statistics.tracking_popular_content
   - history.tracking_user_content
 ---
 {% set recent_link_text %}
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 63fb2df74a1b..98b25a83581d 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -355,14 +355,13 @@
  * security, or encryption benefits. In an environment where Drupal
  * is behind a reverse proxy, the real IP address of the client should
  * be determined such that the correct client IP address is available
- * to Drupal's logging, statistics, and access management systems. In
- * the most simple scenario, the proxy server will add an
- * X-Forwarded-For header to the request that contains the client IP
- * address. However, HTTP headers are vulnerable to spoofing, where a
- * malicious client could bypass restrictions by setting the
- * X-Forwarded-For header directly. Therefore, Drupal's proxy
- * configuration requires the IP addresses of all remote proxies to be
- * specified in $settings['reverse_proxy_addresses'] to work correctly.
+ * to Drupal's logging and access management systems. In the most simple
+ * scenario, the proxy server will add an X-Forwarded-For header to the request
+ * that contains the client IP address. However, HTTP headers are vulnerable to
+ * spoofing, where a malicious client could bypass restrictions by setting the
+ * X-Forwarded-For header directly. Therefore, Drupal's proxy configuration
+ * requires the IP addresses of all remote proxies to be specified in
+ * $settings['reverse_proxy_addresses'] to work correctly.
  *
  * Enable this setting to get Drupal to determine the client IP from the
  * X-Forwarded-For header. If you are unsure about this setting, do not have a
-- 
GitLab