Commit 1d24d476 authored by Markus Hoelzle's avatar Markus Hoelzle Committed by Stefan Neufeind
Browse files

[TASK] Show TYPO3 version in system information toolbar item

This patch adds the information about the current TYPO3 version to the
system information toolbar item.

Releases: master
Resolves: #77785
Change-Id: Ib7660351a7c640c03de89d2c15d46934758f494c
Reviewed-on: https://review.typo3.org/49757

Reviewed-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarRalf Merz <info@merzilla.de>
Tested-by: default avatarRalf Merz <info@merzilla.de>
Reviewed-by: default avatarMichael Oehlhof <typo3@oehlhof.de>
Tested-by: default avatarMichael Oehlhof <typo3@oehlhof.de>
Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: Matthias Vogel's avatarMatthias Vogel <typo3@kanti.de>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
parent b1598c39
......@@ -28,6 +28,7 @@ use TYPO3\CMS\Core\Utility\CommandUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\StringUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
......@@ -116,6 +117,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
*/
protected function collectInformation()
{
$this->getTypo3Version();
$this->getWebServer();
$this->getPhpVersion();
$this->getDatabase();
......@@ -278,6 +280,18 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
];
}
/**
* Gets the TYPO3 version
*/
protected function getTypo3Version()
{
$this->systemInformation[] = [
'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.typo3-version')),
'value' => htmlspecialchars(VersionNumberUtility::getCurrentTypo3Version()),
'icon' => $this->iconFactory->getIcon('sysinfo-typo3-version', Icon::SIZE_SMALL)->render()
];
}
/**
* Emits the "getSystemInformation" signal
*
......
......@@ -2473,6 +2473,12 @@ class IconRegistry implements SingletonInterface
'name' => 'windows'
]
],
'sysinfo-typo3-version' => [
'provider' => SvgIconProvider::class,
'options' => [
'source' => 'EXT:core/Resources/Public/Icons/T3Icons/sysinfo/sysinfo-typo3-version.svg'
]
],
// Sysnote
'sysnote-type-0' => [
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ddd" d="m 11.072,10.292 c -0.192,0.048 -0.336,0.072 -0.504,0.072 -1.536,0 -3.816,-5.4 -3.816,-7.176 C 6.752,2.516 6.92,2.3 7.136,2.108 5.24,2.324 2.984,3.02 2.264,3.908 2.096,4.124 2,4.484 2,4.916 c 0,2.808 3,9.168 5.112,9.168 0.96,0 2.616,-1.608 3.96,-3.792 M 10.088,1.916 C 12.032,1.916 14,2.228 14,3.332 14,5.564 12.584,8.276 11.864,8.276 10.568,8.276 8.96,4.676 8.96,2.9 8.96,2.084 9.272,1.916 10.088,1.916"/></svg>
\ No newline at end of file
......@@ -1227,6 +1227,9 @@ Do you want to refresh it now?</source>
<trans-unit id="toolbarItems.sysinfo.webserver">
<source>Webserver</source>
</trans-unit>
<trans-unit id="toolbarItems.sysinfo.typo3-version">
<source>TYPO3 Version</source>
</trans-unit>
<trans-unit id="ExtDirect.namespaceError" xml:space="preserve">
<source>Ext Direct error in "%s" with namespace: "%s"\n
Try to clear the TYPO3 cache and / or use parameter no_cache=1 as parameter in URL typo3/index.php\n\n
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment