File: 0029-Disable-the-GeoIP-option-at-setup-time.patch

package info (click to toggle)
matomo 5.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,596 kB
  • sloc: php: 231,041; javascript: 102,286; python: 202; xml: 189; sh: 172; makefile: 20; sql: 10
file content (36 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: William Desportes <williamdes@wdes.fr>
Date: Sat, 1 Feb 2025 21:39:30 +0100
Subject: Disable the GeoIP option at setup time

It does not work and crashes the setup

Origin: vendor
Forwarded: not-needed
---
 plugins/GeoIp2/GeoIp2.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/GeoIp2/GeoIp2.php b/plugins/GeoIp2/GeoIp2.php
index f61c200..97f15c2 100644
--- a/plugins/GeoIp2/GeoIp2.php
+++ b/plugins/GeoIp2/GeoIp2.php
@@ -86,7 +86,9 @@ class GeoIp2 extends \Piwik\Plugin
         $form->addElement(
             'checkbox',
             'setup_geoip2',
-            null,
+            [
+                'disabled',
+            ],
             [
                 'content' => '<div class="form-help">' . Piwik::translate('GeoIp2_AutomaticSetupDescription', ['<a rel="noreferrer noopener" target="_blank" href="https://db-ip.com/db/lite.php?refid=mtm">','</a>']) . '</div> &nbsp;&nbsp;' . Piwik::translate('GeoIp2_AutomaticSetup'),
             ]
@@ -94,7 +96,7 @@ class GeoIp2 extends \Piwik\Plugin
 
         // default values
         $form->addDataSource(new \HTML_QuickForm2_DataSource_Array([
-            'setup_geoip2' => true,
+            'setup_geoip2' => false,
         ]));
     }