translator = $translator;
}
public function execute()
{
$faqLinks = [
'',
''
];
$label = $this->translator->translate('Installation_SystemCheckUpdateHttps');
if (GeneralConfig::getConfigValue('force_matomo_http_request') == 1) {
//if config is on, show info
$comment = $this->translator->translate('Installation_MatomoHttpRequestConfigInfo', $faqLinks);
return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_INFORMATIONAL, $comment));
} elseif (!Http::isUpdatingOverHttps()) {
// failed to request over https
$warning = 'We will soon switch to HTTPS by default. Please make sure that HTTPS works on your environment or turn on `force_matomo_http_request`, otherwise it could cause Matomo updates to fail in the future. For more details please read our FAQ.';
return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $warning));
} else {
// successful using https
return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK));
}
}
}