cosmetic
This commit is contained in:
parent
05a74d8f8a
commit
5354e21c02
16
_admin.php
16
_admin.php
@ -38,21 +38,20 @@ dcCore::app()->addBehavior('adminDashboardFavoritesV2', function ($favs) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dcCore::app()->addBehavior('pluginsToolsTabsV2', function () {
|
dcCore::app()->addBehavior('pluginsToolsTabsV2', function () {
|
||||||
$path = DC_PLUGINS_ROOT;
|
|
||||||
$redir = dcCore::app()->adminurl->get('admin.plugins', [], '#uninstaller');
|
|
||||||
$title = '';
|
|
||||||
|
|
||||||
if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->dcAdvancedCleaner_behavior_active) {
|
if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->dcAdvancedCleaner_behavior_active) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$title = empty($title) ? __('Advanced uninstall') : $title;
|
|
||||||
|
$path = DC_PLUGINS_ROOT;
|
||||||
|
$redir = dcCore::app()->adminurl->get('admin.plugins', [], '#uninstaller');
|
||||||
|
$title = '';
|
||||||
|
|
||||||
$uninstaller = new dcUninstaller();
|
$uninstaller = new dcUninstaller();
|
||||||
$uninstaller->loadModules($path);
|
$uninstaller->loadModules($path);
|
||||||
$modules = $uninstaller->getModules();
|
$modules = $uninstaller->getModules();
|
||||||
$props = $uninstaller->getAllowedActions();
|
$props = $uninstaller->getAllowedActions();
|
||||||
|
|
||||||
echo '<div class="multi-part" id="uninstaller" title="' . __($title) . '"><h3>' . __($title) . '</h3>';
|
echo '<div class="multi-part" id="uninstaller" title="' . __('Advanced uninstall') . '"><h3>' . __('Advanced uninstall') . '</h3>';
|
||||||
|
|
||||||
if (!count($modules)) {
|
if (!count($modules)) {
|
||||||
echo '<p>' . __('There is no module with uninstall features') . '</p></div>';
|
echo '<p>' . __('There is no module with uninstall features') . '</p></div>';
|
||||||
@ -207,11 +206,12 @@ dcCore::app()->addBehavior('themeBeforeDelete', function ($theme) {
|
|||||||
|
|
||||||
function dcAdvancedCleanerModuleBeforeDelete($module)
|
function dcAdvancedCleanerModuleBeforeDelete($module)
|
||||||
{
|
{
|
||||||
$done = false;
|
|
||||||
|
|
||||||
if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->dcAdvancedCleaner_behavior_active) {
|
if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->dcAdvancedCleaner_behavior_active) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$done = false;
|
||||||
|
|
||||||
$uninstaller = new dcUninstaller();
|
$uninstaller = new dcUninstaller();
|
||||||
$uninstaller->loadModule($module['root']);
|
$uninstaller->loadModule($module['root']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user