Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: PHP Version #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion assets/dashboard.index.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,16 @@ table.skinny th {
border-bottom: 1px solid #ccc;
padding: 2px 5px 8px 5px;
line-height: 1;
}
}

.status-notice {
color: #f9ba4b;
}

.status-ok {
color: #90c648;
}

.status-error {
color: #c4301e;
}
6 changes: 3 additions & 3 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<span style="color:green">' . $version . '</span>'));
$dl->appendChild(new XMLElement('dd', '<span class="status-ok">' . $version . '</span>'));
} elseif ($ver === 7.0) {
$dl->appendChild(new XMLElement('dt', __('PHP Version')));
$dl->appendChild(new XMLElement('dd', '<span style="color:orange">' . $version . '<br />Please go to your server management and check if a newer PHP version is available.</span>'));
$dl->appendChild(new XMLElement('dd', '<span class="status-notice">' . $version . '<br />' . __('Please go to your server management and check if a newer PHP version is available.') . '</span>'));
} else {
$dl->appendChild(new XMLElement('dt', __('PHP Version')));
$dl->appendChild(new XMLElement('dd', '<span style="color:red">' . $version . '<br />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.</ span>'));
$dl->appendChild(new XMLElement('dd', '<span class="status-error">' . $version . '<br />' . __('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.') . '</span>'));
}

$container->appendChild(new XMLElement('h4', __('Configuration')));
Expand Down
9 changes: 9 additions & 0 deletions lang/lang.de.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',

);