diff --git a/CHANGELOG.md b/CHANGELOG.md index 908031b..24adbb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ 0.7.3.1 - dev - [ ] orphan media cleaner - [ ] ajouter dossier /var dans la liste des caches -- [ ] update DC official values (themes,settings,tables...) -- [ ] fix admin design -- [ ] fix php7.3+ and php8.0 -- [ ] fix PSR(1)2 coding style +- [x] update DC official values (themes,settings,tables...) +- [x] fix admin design +- [x] fix php7.3+ and php8.0 +- [x] fix PSR(1)2 coding style - [ ] fix translation - [x] add dcstore (pre release) - [x] update license diff --git a/_config.php b/_config.php index 647f8e6..f2c6f3a 100644 --- a/_config.php +++ b/_config.php @@ -1,5 +1,15 @@ activityReport->addAction( diff --git a/inc/lib.dc.advanced.cleaner.behaviors.php b/inc/lib.dc.advanced.cleaner.behaviors.php index f7c095c..a43f2a4 100644 --- a/inc/lib.dc.advanced.cleaner.behaviors.php +++ b/inc/lib.dc.advanced.cleaner.behaviors.php @@ -60,17 +60,16 @@ class behaviorsDcAdvancedCleaner } } - public static function dcAdvancedCleanerAdminTabs($core, $p_url) + public static function dcAdvancedCleanerAdminTabs($core) { - self::modulesTabs($core,DC_PLUGINS_ROOT,$p_url.'&tab=uninstaller'); + self::modulesTabs($core, DC_PLUGINS_ROOT, $core->adminurl->get('admin.plugin.dcAdvancedCleaner', ['tab' => 'uninstaller'])); } public static function pluginsToolsTabs($core) { - self::modulesTabs($core, DC_PLUGINS_ROOT, 'plugins.php?tab=uninstaller'); + self::modulesTabs($core, DC_PLUGINS_ROOT, $core->adminurl->get('admin.plugins', ['tab' => 'uninstaller'])); } - // Generic module tabs public static function modulesTabs($core, $path, $redir, $title = '') { if (!$core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_behavior_active) { @@ -119,13 +118,14 @@ class behaviorsDcAdvancedCleaner } } } - http::redirect($redir . '&msg=1'); + dcPage::addSuccessNotice(__('Action successfuly excecuted')); + http::redirect($redir); } catch(Exception $e) { $err = $e->getMessage(); } } - echo '
' . $err . '
'; @@ -214,7 +214,8 @@ class behaviorsDcAdvancedCleaner form::hidden(['action'], 'uninstall') . ' ' . '' . - '' . - '' . $combo_help[$type] . '
'; - - if (empty($rs)) { - echo - '' . sprintf(__('There is no %s'), __(substr($type, 0, -1))) . '
'; - } else { - echo - '' . sprintf(__('There are %s %s'), count($rs), __($type)) . '
' . - ''; - } - echo - '' . __('Beware: All actions done here are irreversible and are directly applied') . '
'; + '' . __('Advanced cleaner') . '' => '' +]) . +dcPage::notices() . ' +'; -echo '
'; foreach($combo_title as $k => $v) { - echo '' . $v . ' '; + echo sprintf( + '%s', + $core->adminurl->get( + 'admin.plugin.dcAdvancedCleaner', + ['tab' => 'lists', 'part' => $k] + ), + $v + ); } echo '
'; -# Load "part" page -if (isset($combo_title[$part])) { - echo ''; +if (isset($combo_funcs[$part])) { + echo '' . $combo_help[$part] . '
'; + + $rs = call_user_func($combo_funcs[$part], $core); + + if (empty($rs)) { + echo '' . sprintf(__('There is no %s'), __(substr($part, 0, -1))) . '
'; + } else { + echo + '' . sprintf(__('There are %s %s'), count($rs), __($part)) . '
' . + ''; + } } if ($s->dcAdvancedCleaner_dcproperty_hide) { - echo '' . __('Default values of Dotclear are hidden. You can change this in settings tab') . '
'; + echo '' . + __('Default values of Dotclear are hidden. You can change this in settings tab') . + '
'; } + echo '