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-30 00:47:28 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-07-30 00:47:28 +0300
commitcc5d65e4e691967bf1f9ab79b29ea75d34daa396 (patch)
tree15a0cfcf91a879689b25637e8b4a5bc2bbb155a1 /plugins/Diagnostics
parentcd40e223a7c2df7e87c213b0d4fd4ef9a9551355 (diff)
Adds special handling for SSL check during install (#13218)
* Adds special handling for SSL check during install * update screenshot
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r--plugins/Diagnostics/Diagnostic/ForceSSLCheck.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/Diagnostics/Diagnostic/ForceSSLCheck.php b/plugins/Diagnostics/Diagnostic/ForceSSLCheck.php
index de21240bf0..2640917a95 100644
--- a/plugins/Diagnostics/Diagnostic/ForceSSLCheck.php
+++ b/plugins/Diagnostics/Diagnostic/ForceSSLCheck.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\Diagnostics\Diagnostic;
use Piwik\Config;
use Piwik\ProxyHttp;
use Piwik\Translation\Translator;
+use Piwik\Url;
/**
* Check that Matomo is configured to force SSL.
@@ -30,6 +31,20 @@ class ForceSSLCheck implements Diagnostic
{
$label = $this->translator->translate('General_ForcedSSL');
+ // special handling during install
+ $isPiwikInstalling = !Config::getInstance()->existsLocalConfig();
+ if ($isPiwikInstalling) {
+ if (ProxyHttp::isHttps()) {
+ return [];
+ }
+
+ $message = $this->translator->translate('General_UseSSLInstall', [
+ '<a href="https://'. Url::getCurrentHost() . Url::getCurrentScriptName(false) . Url::getCurrentQueryString() .'">',
+ '</a>'
+ ]);
+ return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $message)];
+ }
+
$forceSSLEnabled = (Config::getInstance()->General['force_ssl'] == 1);
if ($forceSSLEnabled) {