diff options
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r-- | plugins/Diagnostics/Diagnostic/CronArchivingCheck.php | 3 | ||||
-rw-r--r-- | plugins/Diagnostics/Diagnostic/DiagnosticResult.php | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php b/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php index 25581f3a8f..ad2520377c 100644 --- a/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php +++ b/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php @@ -77,7 +77,8 @@ class CronArchivingCheck implements Diagnostic } $comment .= $this->translator->translate('Installation_NotSupported') . ' ' . $this->translator->translate('Goals_Optional') - . ' (' . $this->translator->translate('General_Reasons') . ': ' . $reasonText . ')'; + . ' (' . $this->translator->translate('General_Reasons') . ': ' . $reasonText . ')' + . $this->translator->translate('General_LearnMore', [' <a target="_blank" href="https://matomo.org/faq/troubleshooting/how-to-make-the-diagnostic-managing-processes-via-cli-to-display-ok/">', '</a>']); $status = DiagnosticResult::STATUS_INFORMATIONAL; } diff --git a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php index f95407d40a..d0e1381ce1 100644 --- a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php +++ b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php @@ -8,6 +8,8 @@ namespace Piwik\Plugins\Diagnostics\Diagnostic; +use Piwik\Common; + /** * The result of a diagnostic. * @@ -55,20 +57,23 @@ class DiagnosticResult /** * @param string $label - * @param string $status * @param string $comment + * @param bool $escapeComment * @return DiagnosticResult */ - public static function informationalResult($label, $comment = '') + public static function informationalResult($label, $comment = '', $escapeComment = true) { if ($comment === true) { $comment = '1'; } elseif ($comment === false) { $comment = '0'; } - $result = new self($label); - $result->addItem(new DiagnosticResultItem(self::STATUS_INFORMATIONAL, $comment)); - return $result; + + if ($escapeComment) { + $comment = Common::sanitizeInputValue($comment); + } + + return self::singleResult($label, self::STATUS_INFORMATIONAL, $comment); } /** |