diff options
author | Justin Velluppillai <justin@innocraft.com> | 2021-09-27 04:13:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 04:13:39 +0300 |
commit | e05ed3fed6cc5803ae0dd3bdc70688fd460ae41a (patch) | |
tree | 9083dc80daa4b96c3e0af1551865f8610ca93e90 | |
parent | a852707a7ce604138234f9e884601823f76a1131 (diff) |
Disable http requests on config (#18063)
* re-init
* Updated expected screenshot
4 files changed, 19 insertions, 3 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index 5d18309b0f..e6ffb55f52 100755 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -833,6 +833,11 @@ rearchive_reports_in_past_last_n_months = 6 ; If set to 1, when rearchiving reports in the past we do not rearchive segment data with those reports. Default is 0. rearchive_reports_in_past_exclude_segments = 0 +; Enable HTTP checks for required and recommended private directories in the diagnostic system check. +; Set this to 0 if you need to skip it because your hosting provider makes your site inaccessible. +; Default is 1. +enable_required_directories_diagnostic = 1 + ; If set to 1, then social and search engine definitions files will be synchronised using the internet if "enable_internet_features" is enabled. ; When set to 0, the definitions will be loaded from the local definitions (updated with core). enable_referrer_definition_syncs = 1 @@ -1220,4 +1225,4 @@ PluginsInstalled[] = Intl SDK_batch_size = 10 SDK_interval_value = 30 -; NOTE: do not directly edit this file! See notice at the top +; NOTE: do not directly edit this file! See notice at the top
\ No newline at end of file diff --git a/plugins/Diagnostics/Diagnostic/AbstractPrivateDirectories.php b/plugins/Diagnostics/Diagnostic/AbstractPrivateDirectories.php index 00ea6ac642..19f76d093d 100644 --- a/plugins/Diagnostics/Diagnostic/AbstractPrivateDirectories.php +++ b/plugins/Diagnostics/Diagnostic/AbstractPrivateDirectories.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\Diagnostics\Diagnostic; use Piwik\Common; +use Piwik\Config; use Piwik\Filesystem; use Piwik\Http; use Piwik\SettingsPiwik; @@ -65,6 +66,15 @@ abstract class AbstractPrivateDirectories implements Diagnostic } $result = new DiagnosticResult($label); + if (Config::getInstance()->General['enable_required_directories_diagnostic'] == 0) { + $result->addItem( + new DiagnosticResultItem( + DiagnosticResult::STATUS_WARNING, + $this->translator->translate('Diagnostics_EnableRequiredDirectoriesDiagnostic') + ) + ); + return [$result]; + } $atLeastOneIsAccessible = $this->computeAccessiblePaths($result, $baseUrl, $testUrls); diff --git a/plugins/Diagnostics/lang/en.json b/plugins/Diagnostics/lang/en.json index b695cddbfa..a0c9388bf7 100644 --- a/plugins/Diagnostics/lang/en.json +++ b/plugins/Diagnostics/lang/en.json @@ -6,6 +6,7 @@ "MysqlMaxPacketSize": "Max Packet Size", "MysqlMaxPacketSizeWarning": "It is recommended to configure a 'max_allowed_packet' size in your MySQL database of at least %1$s. Configured is currently %2$s.", "ConfigFileIntroduction": "Here you can view the Matomo configuration. If you are running Matomo in a load balanced environment, the page might be different depending on from which server this page is loaded. Rows with a different background color are changed config values that are specified for example in the %1$s file.", + "EnableRequiredDirectoriesDiagnostic": "This check was skipped as this check is disabled in the config. To enable this check set [General] enable_required_directories_diagnostic = 1 in the \"config/config.ini.php\" file.", "HideUnchanged": "If you want to see only changed values you can %1$shide all unchanged values%2$s.", "Sections": "Sections", "BrowserAndAutoArchivingEnabledLabel": "Browser and Auto-archiving enabled", diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png index 72b1cdc6c7..e27c743fe1 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ce587e169c99f1a42a2d68c882b9cdc76079e2b62aed02a6f639bc8cfd00c11 -size 5246106 +oid sha256:ca951ddd5215b827698949e5959930dbf657e9eb61b4b2155eb9e3ceefee067f +size 5264975 |