[BUGFIX] Use unknown OS icon instead of Windows as fallback 62/57362/3
authorJan Stockfisch <jan.stockfisch@googlemail.com>
Wed, 25 Apr 2018 14:38:48 +0000 (16:38 +0200)
committerMathias Brodala <mbrodala@pagemachine.de>
Fri, 6 Jul 2018 10:20:21 +0000 (12:20 +0200)
Resolves: #84870
Releases: master, 8.7
Change-Id: Ia89f4ba0aa70616e185cad6cc29858157ef0e656
Reviewed-on: https://review.typo3.org/57362
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Resources/Public/Icons/T3Icons/sysinfo/sysinfo-os-unknown.svg [new file with mode: 0644]

index 78bcfb9..a3af56f 100644 (file)
@@ -208,7 +208,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
      */
     protected function getOperatingSystem()
     {
-        $kernelName = php_uname('s');
+        $kernelName = PHP_OS;
         switch (strtolower($kernelName)) {
             case 'linux':
                 $icon = 'linux';
@@ -216,8 +216,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
             case 'darwin':
                 $icon = 'apple';
                 break;
-            default:
+            case StringUtility::beginsWith($kernelName, 'win'):
                 $icon = 'windows';
+                break;
+            default:
+                $icon = 'unknown';
         }
         $this->systemInformation[] = [
             'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:toolbarItems.sysinfo.operatingsystem',
index aff1f81..1affa64 100644 (file)
@@ -2971,6 +2971,12 @@ class IconRegistry implements SingletonInterface
                 'name' => 'windows'
             ]
         ],
+        'sysinfo-os-unknown' => [
+            'provider' => SvgIconProvider::class,
+            'options' => [
+                'source' => 'EXT:core/Resources/Public/Icons/T3Icons/sysinfo/sysinfo-os-unknown.svg'
+            ]
+        ],
         'sysinfo-typo3-version' => [
             'provider' => SvgIconProvider::class,
             'options' => [
diff --git a/typo3/sysext/core/Resources/Public/Icons/T3Icons/sysinfo/sysinfo-os-unknown.svg b/typo3/sysext/core/Resources/Public/Icons/T3Icons/sysinfo/sysinfo-os-unknown.svg
new file mode 100644 (file)
index 0000000..0e6b244
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g class="icon-color"><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm6 7c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6z"/><path d="M8.1 7.9c0 .7-.2 1.4-.7 1.9-.5.5-1.2.8-1.9.7-.7 0-1.4-.2-1.9-.7-.5-.5-.8-1.2-.8-1.9S3 6.5 3.5 6c.5-.5 1.2-.8 1.9-.7.7 0 1.4.2 1.9.7.6.5.8 1.2.8 1.9zM6.4 9.2c.1-.2.2-.4.2-.6.1-.2.1-.5.1-.7 0-.3 0-.5-.1-.8 0-.2-.1-.4-.3-.5-.1-.2-.2-.3-.4-.3-.3-.1-.6-.1-.9 0-.2 0-.3.1-.4.3-.1.1-.2.3-.3.5-.1.3-.1.5-.1.8 0 .3 0 .5.1.8.1.1.2.3.3.5.1.1.2.2.4.3.2.1.3.1.5.1s.3 0 .5-.1c.1-.1.2-.2.4-.3zM12.9 8.8c0 .5-.2.9-.6 1.2-.5.3-1.1.5-1.7.5-.4 0-.7 0-1.1-.1l-.9-.3V8.9h.1c.3.2.6.4.9.5.3.1.6.2 1 .2h.3c.1 0 .2 0 .3-.1.1 0 .2-.1.2-.2.1-.1.1-.2.1-.3 0-.1-.1-.2-.1-.3-.1-.1-.3-.2-.4-.2-.2 0-.4-.1-.6-.1-.2 0-.4-.1-.6-.2-.4 0-.7-.2-1-.5-.2-.2-.3-.5-.3-.8 0-.5.2-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