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 37 38 39 40 41 42 43 44 45 46 47 48 49
|
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 23:26:02 +0100
Subject: Do not allow Internet use or auto updates
Origin: vendor
Forwarded: not-needed
---
core/SettingsPiwik.php | 6 ++++++
plugins/CoreUpdater/Updater.php | 3 +++
2 files changed, 9 insertions(+)
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index a6ce4b3..717a1a2 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -261,6 +261,9 @@ class SettingsPiwik
*/
public static function isInternetEnabled(): bool
{
+ // Debian is the only way to update and install plugins
+ return false;
+
return (bool) Config::getInstance()->General['enable_internet_features'];
}
@@ -272,6 +275,9 @@ class SettingsPiwik
*/
public static function isAutoUpdateEnabled(): bool
{
+ // Debian is the only way to update
+ return false;
+
$enableAutoUpdate = (bool) Config::getInstance()->General['enable_auto_update'];
if (self::isInternetEnabled() === true && $enableAutoUpdate === true) {
return true;
diff --git a/plugins/CoreUpdater/Updater.php b/plugins/CoreUpdater/Updater.php
index a54f632..38ccf0a 100644
--- a/plugins/CoreUpdater/Updater.php
+++ b/plugins/CoreUpdater/Updater.php
@@ -72,6 +72,9 @@ class Updater
*/
public function isNewVersionAvailable()
{
+ // Debian is the only way to update and check for updates
+ return false;
+
$latestVersion = self::getLatestVersion();
return $latestVersion && version_compare(Version::VERSION, $latestVersion) === -1;
}
|