translator = $translator; } public function execute() { $faqLink = [ Url::getExternalLinkTag('https://matomo.org/faq/faq-how-to-disable-https-for-matomo-org-and-api-matomo-org-requests'), '', ]; $label = $this->translator->translate('Installation_SystemCheckUpdateHttps'); if (GeneralConfig::getConfigValue('force_matomo_http_request') == 1) { // If the config option to force http is enabled then show 'not recommended' message $comment = $this->translator->translate('Installation_MatomoHttpRequestConfigInfo', $faqLink); return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_INFORMATIONAL, $comment)]; } if (!Http::isUpdatingOverHttps()) { // https is not available, show error $error = $this->translator->translate('Installation_MatomoHttpsNotSupported', $faqLink); return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_ERROR, $error)]; } // Success, https is available return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK)]; } }