diff --git a/custom/panel_templates/Default/index.tpl b/custom/panel_templates/Default/index.tpl index 86e1996e7b..40cce88a3b 100644 --- a/custom/panel_templates/Default/index.tpl +++ b/custom/panel_templates/Default/index.tpl @@ -115,15 +115,22 @@ {$NAMELESS_VERSION}
{foreach from=$COMPAT_SUCCESS item=item} - {$item} -
+ {$item} +
{/foreach} {if count($COMPAT_WARNINGS)} -
- {foreach from=$COMPAT_WARNINGS item=item} - {$item} -
- {/foreach} +
+ {foreach from=$COMPAT_WARNINGS item=item key=index} + {$item} + {if isset($COMPAT_WARNINGS_INFO[$index])} + + + + {/if} +
+ {/foreach} {/if} {if count($COMPAT_ERRORS)}
diff --git a/modules/Core/language/en_UK.json b/modules/Core/language/en_UK.json index 946f791a35..d1d0ad54d3 100644 --- a/modules/Core/language/en_UK.json +++ b/modules/Core/language/en_UK.json @@ -82,6 +82,8 @@ "admin/clone_group": "Clone group", "admin/closable": "Closable", "admin/communications": "Communications", + "admin/compat_pdo_version_info": "Either MySQL version {{mysql}} or MariaDB version {{mariadb}} is recommended.", + "admin/compat_php_version_info": "PHP version {{php}} is recommended.", "admin/config_not_writable": "Your core\/config.php file is not writable. Please check file permissions.", "admin/configuration": "Configuration", "admin/confirm_api_regen": "Are you sure you want to regenerate your API key?", diff --git a/modules/Core/pages/panel/index.php b/modules/Core/pages/panel/index.php index 33fc8c7d82..d42f20b920 100644 --- a/modules/Core/pages/panel/index.php +++ b/modules/Core/pages/panel/index.php @@ -114,10 +114,13 @@ if ($user->hasPermission('admincp.core.debugging')) { $compat_success = []; $compat_warnings = []; + $compat_warnings_help = []; $compat_errors = []; - if (PHP_VERSION_ID < 80200) { +// if (PHP_VERSION_ID < 80200) { + if (PHP_VERSION_ID < 90200) { $compat_warnings[] = 'PHP ' . PHP_VERSION; + $compat_warnings_help[] = $language->get('admin', 'compat_php_version_info', ['php' => '8.0+']); } else { $compat_success[] = 'PHP ' . PHP_VERSION; } @@ -179,9 +182,16 @@ if (($pdo_driver === 'MySQL' && version_compare($pdo_server_version, '8.0', '>=')) || ($pdo_driver === 'MariaDB' && version_compare($pdo_server_version, '10.5', '>='))) { $compat_success[] = $pdo_driver . ' Server ' . $pdo_server_version; + } else if (($pdo_driver === 'MySQL' && version_compare($pdo_server_version, '5.7', '>=')) || ($pdo_driver === 'MariaDB' && version_compare($pdo_server_version, '10.3', '>='))) { $compat_warnings[] = $pdo_driver . ' Server ' . $pdo_server_version; + $compat_warnings_help[] = $language->get( + 'admin', + 'compat_pdo_version_info', + ['mysql' => '8.0+', 'mariadb' => '10.5+'] + ); + } else { $compat_errors[] = $pdo_driver . ' Server ' . $pdo_server_version; } @@ -207,12 +217,14 @@ $compat_warnings[] = $language->get('admin', 'panel_template_third_party', [ 'name' => Text::bold($template->getName()), ]); + $compat_warnings_help[] = null; } $smarty->assign([ 'SERVER_COMPATIBILITY' => $language->get('admin', 'server_compatibility'), 'COMPAT_SUCCESS' => $compat_success, 'COMPAT_WARNINGS' => $compat_warnings, + 'COMPAT_WARNINGS_INFO' => $compat_warnings_help, 'COMPAT_ERRORS' => $compat_errors, ]); } @@ -248,6 +260,7 @@ 'NAMELESS_VERSION' => $language->get('admin', 'running_nameless_version', [ 'version' => Text::bold(NAMELESS_VERSION) ]), + 'INFO' => $language->get('general', 'info'), ]); $template->onPageLoad();