diff options
Diffstat (limited to 'plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php')
-rw-r--r-- | plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php b/plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php index dd571b8c15..b90f9115c7 100644 --- a/plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php +++ b/plugins/CoreUpdater/Diagnostic/HttpsUpdateCheck.php @@ -7,7 +7,8 @@ */ namespace Piwik\Plugins\CoreUpdater\Diagnostic; -use Piwik\Plugins\CoreUpdater; +use Piwik\Config\GeneralConfig; +use Piwik\Http; use Piwik\Plugins\Diagnostics\Diagnostic\Diagnostic; use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult; use Piwik\Translation\Translator; @@ -31,12 +32,18 @@ class HttpsUpdateCheck implements Diagnostic { $label = $this->translator->translate('Installation_SystemCheckUpdateHttps'); - if (CoreUpdater\Controller::isUpdatingOverHttps()) { + if (GeneralConfig::getConfigValue('force_matomo_ssl_request') === 0) { + //if config is off, show info + $comment = $this->translator->translate('Installation_MatomoSslRequestConfigInfo');; + return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_INFORMATIONAL, $comment)); + } elseif (Http::isUpdatingOverHttps()) { + // successful using https return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK)); + } else { + // failed to request over https + $comment = $this->translator->translate('Installation_SystemCheckUpdateHttpsNotSupported'); + return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $comment)); } - $comment = $this->translator->translate('Installation_SystemCheckUpdateHttpsNotSupported'); - - return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $comment)); } } |