Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2018-07-10 22:44:52 +0300
committerGitHub <noreply@github.com>2018-07-10 22:44:52 +0300
commit4b88aa24c9c85c45340ca854c812c21014d86dc2 (patch)
treee1f279d3d4faa5d3ac00a523dff360e9abec3fe0 /core/FrontController.php
parenta4c01fe919de7c5696e3c06d2c066085e08ec255 (diff)
Disables some more feature if internet features are disabled (#13076)
* Disable GeoIP update tasks if no internet connection available * Show GeoLocation Auto Updater UI only with enabled internet connection * Throw exception if Marketplace is used without enabled internet features * Hide Marketplace menu entry if internet is disabled * Implements new plugin class method requiresInternetConnection, to automatically unloaded plugins if required * Improve how plugins not working without internet connection are shown in plugin list * Adds UI test * typo 'whether'
Diffstat (limited to 'core/FrontController.php')
-rw-r--r--core/FrontController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 2e0ff8e960..c7b75a84b6 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -15,6 +15,7 @@ use Piwik\Container\StaticContainer;
use Piwik\Exception\AuthenticationFailedException;
use Piwik\Exception\DatabaseSchemaIsNewerThanCodebaseException;
use Piwik\Exception\PluginDeactivatedException;
+use Piwik\Exception\PluginRequiresInternetException;
use Piwik\Exception\StylesheetLessCompileException;
use Piwik\Http\ControllerResolver;
use Piwik\Http\Router;
@@ -422,6 +423,10 @@ class FrontController extends Singleton
list($module, $action) = Request::getRenamedModuleAndAction($module, $action);
+ if (!SettingsPiwik::isInternetEnabled() && \Piwik\Plugin\Manager::getInstance()->doesPluginRequireInternetConnection($module)) {
+ throw new PluginRequiresInternetException($module);
+ }
+
if (!\Piwik\Plugin\Manager::getInstance()->isPluginActivated($module)) {
throw new PluginDeactivatedException($module);
}