add Dotclear max version to keep track of compatibility
This commit is contained in:
parent
3595d020df
commit
4e08d6ed5f
18
_admin.php
18
_admin.php
@ -25,6 +25,8 @@ $core->addBehavior('themesToolsTabs', ['csvBehaviors', 'themesToolsTabs']);
|
||||
|
||||
class csvBehaviors
|
||||
{
|
||||
public const DC_MAX = '2.23.1';
|
||||
|
||||
# admin plugins page tab
|
||||
public static function pluginsToolsTabs(dcCore $core): void
|
||||
{
|
||||
@ -40,6 +42,18 @@ class csvBehaviors
|
||||
# generic page tab
|
||||
protected static function modulesToolsTabs(dcCore $core, dcModules $modules, array $excludes, string $page_url): void
|
||||
{
|
||||
echo
|
||||
'<div class="multi-part" id="csv" title="' . __('Store version') . '">' .
|
||||
'<h3>' . __('Check stores versions') . '</h3>';
|
||||
|
||||
if (!method_exists('dcUtils', 'versionsCompare')
|
||||
|| dcUtils::versionsCompare(DC_VERSION, self::DC_MAX, '>', false)) {
|
||||
echo
|
||||
'<div class="error"><p>' . sprintf(__('This version does not support Dotclear > %s'), self::DC_MAX) . '</p></div>';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$list = [];
|
||||
foreach (array_merge($modules->getModules(), $modules->getDisabledModules()) as $id => $module) {
|
||||
if (!in_array($id, $excludes)) {
|
||||
@ -47,10 +61,6 @@ class csvBehaviors
|
||||
}
|
||||
}
|
||||
|
||||
echo
|
||||
'<div class="multi-part" id="csv" title="' . __('Store version') . '">' .
|
||||
'<h3>' . __('Check stores versions') . '</h3>';
|
||||
|
||||
if (!count($list)) {
|
||||
echo
|
||||
'<div class="info">' . __('There is no module to check') . '</div>' .
|
||||
|
Loading…
Reference in New Issue
Block a user