From 51d22656f2923eb84f51d15fc8a3b6cb36bae4d0 Mon Sep 17 00:00:00 2001 From: tiloschroeder Date: Thu, 24 Jan 2019 16:03:29 +0100 Subject: [PATCH 1/2] Improved: PHP Version - remove inline styles --- assets/dashboard.index.css | 14 +++++++++++++- extension.driver.php | 6 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/assets/dashboard.index.css b/assets/dashboard.index.css index d8e83d4..bb31747 100644 --- a/assets/dashboard.index.css +++ b/assets/dashboard.index.css @@ -306,4 +306,16 @@ table.skinny th { border-bottom: 1px solid #ccc; padding: 2px 5px 8px 5px; line-height: 1; -} \ No newline at end of file +} + +.status-notice { + color: #f9ba4b; +} + +.status-ok { + color: #90c648; +} + +.status-error { + color: #c4301e; +} diff --git a/extension.driver.php b/extension.driver.php index 0c4b2e3..eb22edd 100644 --- a/extension.driver.php +++ b/extension.driver.php @@ -525,13 +525,13 @@ public function render_panel($context) { $version = phpversion(); if ($ver > 7.0) { $dl->appendChild(new XMLElement('dt', __('PHP Version'))); - $dl->appendChild(new XMLElement('dd', '' . $version . '')); + $dl->appendChild(new XMLElement('dd', '' . $version . '')); } elseif ($ver === 7.0) { $dl->appendChild(new XMLElement('dt', __('PHP Version'))); - $dl->appendChild(new XMLElement('dd', '' . $version . '
Please go to your server management and check if a newer PHP version is available.
')); + $dl->appendChild(new XMLElement('dd', '' . $version . '
Please go to your server management and check if a newer PHP version is available.
')); } else { $dl->appendChild(new XMLElement('dt', __('PHP Version'))); - $dl->appendChild(new XMLElement('dd', '' . $version . '
Your PHP version is outdated. For security reasons, please go to your server management and set the current PHP version (> 7.0) for this host.')); + $dl->appendChild(new XMLElement('dd', '' . $version . '
Your PHP version is outdated. For security reasons, please go to your server management and set the current PHP version (> 7.0) for this host.
')); } $container->appendChild(new XMLElement('h4', __('Configuration'))); From e5d54be2d8f9d0e1f046a5cfd10ed7dc82ae2acb Mon Sep 17 00:00:00 2001 From: tiloschroeder Date: Thu, 24 Jan 2019 17:19:07 +0100 Subject: [PATCH 2/2] Improved: PHP Version (i18n) - strings now translatable - add German translation --- extension.driver.php | 4 ++-- lang/lang.de.php | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/extension.driver.php b/extension.driver.php index eb22edd..8617dae 100644 --- a/extension.driver.php +++ b/extension.driver.php @@ -528,10 +528,10 @@ public function render_panel($context) { $dl->appendChild(new XMLElement('dd', '' . $version . '')); } elseif ($ver === 7.0) { $dl->appendChild(new XMLElement('dt', __('PHP Version'))); - $dl->appendChild(new XMLElement('dd', '' . $version . '
Please go to your server management and check if a newer PHP version is available.
')); + $dl->appendChild(new XMLElement('dd', '' . $version . '
' . __('Please go to your server management and check if a newer PHP version is available.') . '
')); } else { $dl->appendChild(new XMLElement('dt', __('PHP Version'))); - $dl->appendChild(new XMLElement('dd', '' . $version . '
Your PHP version is outdated. For security reasons, please go to your server management and set the current PHP version (> 7.0) for this host.
')); + $dl->appendChild(new XMLElement('dd', '' . $version . '
' . __('Your PHP version is outdated. For security reasons, please go to your server management and set the current PHP version (> 7.0) for this host.') . '
')); } $container->appendChild(new XMLElement('h4', __('Configuration'))); diff --git a/lang/lang.de.php b/lang/lang.de.php index 4d9f7f7..0b7e1de 100644 --- a/lang/lang.de.php +++ b/lang/lang.de.php @@ -105,4 +105,13 @@ 'Disable Editing' => 'Speichern', + 'PHP Version' => + 'PHP-Version', + + 'Please go to your server management and check if a newer PHP version is available.' => + 'Bitte log dich im Server-Management ein und prüfe, ob eine neuere PHP-Version verfügbar ist.', + + 'Your PHP version is outdated. For security reasons, please go to your server management and set the current PHP version (> 7.0) for this host.' => + 'Die PHP-Version ist veraltet. Wechsel aus Sicherheitsgründen in das Server-Management und stelle die aktuelle PHP-Version (> 7.0) für diesen Host ein.', + );