From cb59c3554198f5e1f21dfcef1cac8bbddbbcc070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20G=C3=B6tze?= <jonnsn@gmail.com>
Date: Fri, 4 Mar 2016 16:41:14 +0100
Subject: [PATCH] [FOLLOWUP][FEATURE] Report wrong database character set

This adds the Feature ReST-File and fixes to small whitespace issues

Resolves: #74038
Releases: master
Change-Id: I885db774de249c1e9bd9963c1266934884e5c396
Reviewed-on: https://review.typo3.org/47064
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
---
 ...4038-ReportForCheckingDatabaseCharacterSet.rst | 15 +++++++++++++++
 .../Classes/Report/Status/ConfigurationStatus.php |  4 ++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Feature-74038-ReportForCheckingDatabaseCharacterSet.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-74038-ReportForCheckingDatabaseCharacterSet.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-74038-ReportForCheckingDatabaseCharacterSet.rst
new file mode 100644
index 000000000000..a61212fe12f8
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-74038-ReportForCheckingDatabaseCharacterSet.rst
@@ -0,0 +1,15 @@
+============================================================
+Feature: #74038 - Report for checking database character set
+============================================================
+
+Description
+===========
+
+If a database has e.g. latin1 as default character set, new tables or fields created by TYPO3 will be created
+with this default charset as utf-8 is not enforced.
+A report has been added that checks the default charset and warns administrators if a wrong charset is used.
+
+Impact
+======
+
+If the default database character set is not utf-8, the report warns administrators about a wrong charset.
\ No newline at end of file
diff --git a/typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php b/typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
index cdc9474d7555..e06b064d2d16 100644
--- a/typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
+++ b/typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
@@ -286,13 +286,13 @@ class ConfigurationStatus implements StatusProviderInterface
         $statusValue = $this->getLanguageService()->getLL('status_ok');
 
         if ($key !== 'character_set_database') {
-            $message = sprintf($this->getLanguageService()->getLL('status_MysqlDatabaseCharacterSet_CheckFailed'),$key);
+            $message = sprintf($this->getLanguageService()->getLL('status_MysqlDatabaseCharacterSet_CheckFailed'), $key);
             $severity = ReportStatus::WARNING;
             $statusValue = $this->getLanguageService()->getLL('status_checkFailed');
         }
         // also allow utf8mb4
         if (substr($value, 0, 4) !== 'utf8') {
-            $message = sprintf($this->getLanguageService()->getLL('status_MysqlDatabaseCharacterSet_Unsupported'),$value);
+            $message = sprintf($this->getLanguageService()->getLL('status_MysqlDatabaseCharacterSet_Unsupported'), $value);
             $severity = ReportStatus::ERROR;
             $statusValue = $this->getLanguageService()->getLL('status_wrongValue');
         } else {
-- 
GitLab