v0.7.2 cf release.txt
parent
eb3a47eed0
commit
f23ca51572
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')){return;}
|
||||
|
||||
$_menu['Plugins']->addItem(
|
||||
__('Advanced cleaner'),
|
||||
'plugin.php?p=dcAdvancedCleaner',
|
||||
'index.php?pf=dcAdvancedCleaner/icon.png',
|
||||
preg_match('/plugin.php\?p=dcAdvancedCleaner(&.*)?$/',$_SERVER['REQUEST_URI']),
|
||||
$core->auth->isSuperAdmin()
|
||||
);
|
||||
|
||||
$core->addBehavior('adminDashboardFavorites','dcAdvancedCleanerDashboardFavorites');
|
||||
|
||||
function dcAdvancedCleanerDashboardFavorites($core,$favs)
|
||||
{
|
||||
$favs->register('dcAdvancedCleaner', array(
|
||||
'title' => __('Advanced cleaner'),
|
||||
'url' => 'plugin.php?p=dcAdvancedCleaner',
|
||||
'small-icon' => 'index.php?pf=dcAdvancedCleaner/icon.png',
|
||||
'large-icon' => 'index.php?pf=dcAdvancedCleaner/icon-big.png',
|
||||
'permissions' => 'usage,contentadmin'
|
||||
));
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')){return;}
|
||||
|
||||
$this->registerModule(
|
||||
/* Name */ "Advanced cleaner",
|
||||
/* Description*/ "Make a huge cleaning of dotclear",
|
||||
/* Author */ "JC Denis",
|
||||
/* Version */ '0.7.2',
|
||||
/* Properties */
|
||||
array(
|
||||
'permissions' => null,
|
||||
'type' => 'plugin',
|
||||
'dc_min' => '2.9',
|
||||
'support' => 'https://forum.dotclear.org/viewtopic.php?id=40381',
|
||||
'details' => 'http://plugins.dotaddict.org/dc2/details/dcAdvancedCleaner'
|
||||
)
|
||||
);
|
||||
/* date */ #20180213
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')){return;}
|
||||
|
||||
# Get new version
|
||||
$new_version = $core->plugins->moduleInfo('dcAdvancedCleaner','version');
|
||||
$old_version = $core->getVersion('dcAdvancedCleaner');
|
||||
|
||||
# Compare versions
|
||||
if (version_compare($old_version,$new_version,'>=')) {return;}
|
||||
|
||||
# Install or update
|
||||
try
|
||||
{
|
||||
# Check DC version
|
||||
if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<'))
|
||||
{
|
||||
throw new Exception('dcAdvancedCleaner requires Dotclear 2.2');
|
||||
}
|
||||
|
||||
# Settings
|
||||
$core->blog->settings->addNamespace('dcAdvancedCleaner');
|
||||
$core->blog->settings->dcAdvancedCleaner->put('dcAdvancedCleaner_behavior_active',true,'boolean','',false,true);
|
||||
$core->blog->settings->dcAdvancedCleaner->put('dcAdvancedCleaner_dcproperty_hide',true,'boolean','',false,true);
|
||||
|
||||
# Version
|
||||
$core->setVersion('dcAdvancedCleaner',$new_version);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$core->error->add($e->getMessage());
|
||||
return false;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) return;
|
||||
|
||||
global $__autoload, $core;
|
||||
$core->blog->settings->addNamespace('dcAdvancedCleaner');
|
||||
|
||||
# Main class
|
||||
$__autoload['dcAdvancedCleaner'] =
|
||||
dirname(__FILE__).'/inc/class.dc.advanced.cleaner.php';
|
||||
|
||||
# Behaviors class
|
||||
$__autoload['behaviorsDcAdvancedCleaner'] =
|
||||
dirname(__FILE__).'/inc/lib.dc.advanced.cleaner.behaviors.php';
|
||||
|
||||
# Unsintaller class
|
||||
$__autoload['dcUninstaller'] =
|
||||
dirname(__FILE__).'/inc/class.dc.uninstaller.php';
|
||||
|
||||
# Add tab on plugin admin page
|
||||
$core->addBehavior('pluginsToolsTabs',
|
||||
array('behaviorsDcAdvancedCleaner','pluginsToolsTabs'));
|
||||
|
||||
# Action on plugin deletion
|
||||
$core->addBehavior('pluginsBeforeDelete',
|
||||
array('behaviorsDcAdvancedCleaner','pluginsBeforeDelete'));
|
||||
|
||||
# Action on theme deletion
|
||||
$core->addBehavior('themeBeforeDelete',
|
||||
array('behaviorsDcAdvancedCleaner','themeBeforeDelete'));
|
||||
|
||||
# Tabs of dcAvdancedCleaner admin page
|
||||
$core->addBehavior('dcAdvancedCleanerAdminTabs',
|
||||
array('behaviorsDcAdvancedCleaner','dcAdvancedCleanerAdminTabs'));
|
||||
|
||||
# Add dcac events on plugin activityReport
|
||||
if (defined('ACTIVITY_REPORT'))
|
||||
{
|
||||
require_once dirname(__FILE__).'/inc/lib.dc.advanced.cleaner.activityreport.php';
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
|
@ -0,0 +1,395 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_ADMIN_CONTEXT')){return;}
|
||||
|
||||
class dcAdvancedCleaner
|
||||
{
|
||||
protected static $errors = array(
|
||||
'settings' => array(
|
||||
'delete_global' => 'Failed to delete global settings',
|
||||
'delete_local' => 'Failed to delete local settings',
|
||||
'delete_all' => 'Failed to delete all settings'
|
||||
),
|
||||
'tables' => array(
|
||||
'empty' => 'Failed to empty table',
|
||||
'delete' => 'Failed to delete table'
|
||||
),
|
||||
'plugins' => array(
|
||||
'empty' => 'Failed to empty plugin folder',
|
||||
'delete' => 'Failed to delete plugin folder'
|
||||
),
|
||||
'themes' => array(
|
||||
'empty' => 'Failed to empty themes folder',
|
||||
'delete' => 'Failed to delete themes folder'
|
||||
),
|
||||
'caches' => array(
|
||||
'empty' => 'Failed to empty cache folder',
|
||||
'delete' => 'Failed to delete cache folder'
|
||||
),
|
||||
'versions' => array(
|
||||
'delete' => 'Failed to delete version'
|
||||
)
|
||||
);
|
||||
|
||||
public static $dotclear = array(
|
||||
'settings' => array(
|
||||
'akismet','antispam','breadcrumb','dcckeditor','dclegacyeditor','maintenance',
|
||||
'pages','pings','system','themes','widgets'
|
||||
),
|
||||
'tables' => array(
|
||||
'blog','category','comment','link','log','media',
|
||||
'meta','permissions','ping','post','post_media','pref','session',
|
||||
'setting','spamrule','user','version'
|
||||
),
|
||||
'plugins' => array(
|
||||
'aboutConfig','akismet','antispam','attachments','blogroll','blowupConfig',
|
||||
'breadcrumb','dcCKEditor','dclegacy','dcLegacyEditor','fairTrackbacks','importExport','maintenance',
|
||||
'pages','pings','simpleMenu','tags','themeEditor','userPref','widgets'
|
||||
),
|
||||
'themes' => array(
|
||||
'default','customCSS','blueSilence','berlin','ductile'
|
||||
),
|
||||
'caches' => array(
|
||||
'cbfeed','dcrepo','versions'
|
||||
),
|
||||
'versions' => array(
|
||||
'antispam','blogroll','blowupConfig','core','dcCKEditor','dcLegacyEditor','pages','pings','simpleMenu','tags','widgets'
|
||||
)
|
||||
);
|
||||
|
||||
public static $exclude = array(
|
||||
'.','..','__MACOSX','.svn','CVS','.DS_Store','Thumbs.db'
|
||||
);
|
||||
|
||||
public static function getSettings($core)
|
||||
{
|
||||
$res = $core->con->select(
|
||||
'SELECT setting_ns '.
|
||||
'FROM '.$core->prefix.'setting '.
|
||||
'WHERE blog_id IS NULL '.
|
||||
"OR blog_id IS NOT NULL ".
|
||||
'GROUP BY setting_ns');
|
||||
|
||||
$rs = array();
|
||||
$i = 0;
|
||||
while($res->fetch()) {
|
||||
|
||||
$rs[$i]['key'] = $res->setting_ns;
|
||||
$rs[$i]['value'] = $core->con->select(
|
||||
'SELECT count(*) FROM '.$core->prefix.'setting '.
|
||||
"WHERE setting_ns = '".$res->setting_ns."' ".
|
||||
"AND (blog_id IS NULL OR blog_id IS NOT NULL) ".
|
||||
"GROUP BY setting_ns ")->f(0);
|
||||
$i++;
|
||||
}
|
||||
return $rs;
|
||||
}
|
||||
|
||||
protected static function deleteGlobalSettings($core,$entry)
|
||||
{
|
||||
$core->con->execute(
|
||||
'DELETE FROM '.$core->prefix.'setting '.
|
||||
'WHERE blog_id IS NULL '.
|
||||
"AND setting_ns = '".$core->con->escape($entry)."' "
|
||||
);
|
||||
}
|
||||
|
||||
protected static function deleteLocalSettings($core,$entry)
|
||||
{
|
||||
$core->con->execute(
|
||||
'DELETE FROM '.$core->prefix.'setting '.
|
||||
"WHERE blog_id = '".$core->con->escape($core->blog->id)."' ".
|
||||
"AND setting_ns = '".$core->con->escape($entry)."' "
|
||||
);
|
||||
}
|
||||
|
||||
protected static function deleteAllSettings($core,$entry)
|
||||
{
|
||||
$core->con->execute(
|
||||
'DELETE FROM '.$core->prefix.'setting '.
|
||||
"WHERE setting_ns = '".$core->con->escape($entry)."' ".
|
||||
"AND (blog_id IS NULL OR blog_id != '') "
|
||||
);
|
||||
}
|
||||
|
||||
public static function getTables($core)
|
||||
{
|
||||
$object = dbSchema::init($core->con);
|
||||
$res = $object->getTables();
|
||||
|
||||
$rs = array();
|
||||
$i = 0;
|
||||
foreach($res as $k => $v)
|
||||
{
|
||||
if ('' != $core->prefix)
|
||||
{
|
||||
if (!preg_match('/^'.preg_quote($core->prefix).'(.*?)$/',$v,$m)) continue;
|
||||
$v = $m[1];
|
||||
}
|
||||
$rs[$i]['key'] = $v;
|
||||
$rs[$i]['value'] = $core->con->select('SELECT count(*) FROM '.$res[$k])->f(0);
|
||||
$i++;
|
||||
}
|
||||
return $rs;
|
||||
}
|
||||
|
||||
protected static function emptyTable($core,$entry)
|
||||
{
|
||||
$core->con->execute(
|
||||
'DELETE FROM '.$core->con->escapeSystem($core->prefix.$entry)
|
||||
);
|
||||
}
|
||||
|
||||
protected static function deleteTable($core,$entry)
|
||||
{
|
||||
self::emptyTable($core,$entry);
|
||||
|
||||
$core->con->execute(
|
||||
'DROP TABLE '.$core->con->escapeSystem($core->prefix.$entry)
|
||||
);
|
||||
}
|
||||
|
||||
public static function getVersions($core)
|
||||
{
|
||||
$res = $core->con->select('SELECT * FROM '.$core->prefix.'version');
|
||||
|
||||
$rs = array();
|
||||
$i = 0;
|
||||
while ($res->fetch()) {
|
||||
|
||||
$rs[$i]['key'] = $res->module;
|
||||
$rs[$i]['value'] = $res->version;
|
||||
$i++;
|
||||
}
|
||||
return $rs;
|
||||
}
|
||||
|
||||
protected static function deleteVersion($core,$entry)
|
||||
{
|
||||
$core->con->execute(
|
||||
'DELETE FROM '.$core->prefix.'version '.
|
||||
"WHERE module = '".$core->con->escape($entry)."' "
|
||||
);
|
||||
}
|
||||
|
||||
public static function getPlugins($core)
|
||||
{
|
||||
$res = explode(PATH_SEPARATOR,DC_PLUGINS_ROOT);
|
||||
return self::getDirs($res);
|
||||
}
|
||||
|
||||
protected static function emptyPlugin($core,$entry)
|
||||
{
|
||||
$res = explode(PATH_SEPARATOR,DC_PLUGINS_ROOT);
|
||||
self::delDir($res,$entry,false);
|
||||
}
|
||||
|
||||
protected static function deletePlugin($core,$entry)
|
||||
{
|
||||
$res = explode(PATH_SEPARATOR,DC_PLUGINS_ROOT);
|
||||
self::delDir($res,$entry,true);
|
||||
}
|
||||
|
||||
public static function getThemes($core)
|
||||
{
|
||||
return self::getDirs($core->blog->themes_path);
|
||||
}
|
||||
|
||||
protected static function emptyTheme($core,$entry)
|
||||
{
|
||||
self::delDir($core->blog->themes_path,$entry,false);
|
||||
}
|
||||
|
||||
protected static function deleteTheme($core,$entry)
|
||||
{
|
||||
self::delDir($core->blog->themes_path,$entry,true);
|
||||
}
|
||||
|
||||
public static function getCaches($core)
|
||||
{
|
||||
return self::getDirs(DC_TPL_CACHE);
|
||||
}
|
||||
|
||||
protected static function emptyCache($core,$entry)
|
||||
{
|
||||
self::delDir(DC_TPL_CACHE,$entry,false);
|
||||
}
|
||||
|
||||
protected static function deleteCache($core,$entry)
|
||||
{
|
||||
self::delDir(DC_TPL_CACHE,$entry,true);
|
||||
}
|
||||
|
||||
public static function execute($core,$type,$action,$ns)
|
||||
{
|
||||
if (strtolower($ns) == 'dcadvancedcleaner')
|
||||
throw new exception("dcAdvancedCleaner can't remove itself");
|
||||
|
||||
# BEHAVIOR dcAdvancedCleanerBeforeAction
|
||||
$core->callBehavior('dcAdvancedCleanerBeforeAction',$type,$action,$ns);
|
||||
|
||||
try {
|
||||
# Delete global settings
|
||||
if ($type == 'settings' && $action == 'delete_global')
|
||||
self::deleteGlobalSettings($core,$ns);
|
||||
|
||||
# Delete local settings
|
||||
if ($type == 'settings' && $action == 'delete_local')
|
||||
self::deleteLocalSettings($core,$ns);
|
||||
|
||||
# Delete all settings
|
||||
if ($type == 'settings' && $action == 'delete_all')
|
||||
self::deleteAllSettings($core,$ns);
|
||||
|
||||
# Empty tables
|
||||
if ($type == 'tables' && $action == 'empty')
|
||||
self::emptyTable($core,$ns);
|
||||
|
||||
# Delete tables
|
||||
if ($type == 'tables' && $action == 'delete')
|
||||
self::deleteTable($core,$ns);
|
||||
|
||||
# Delete versions
|
||||
if ($type == 'versions' && $action == 'delete')
|
||||
self::deleteVersion($core,$ns);
|
||||
|
||||
# Empty plugins
|
||||
if ($type == 'plugins' && $action == 'empty')
|
||||
self::emptyPlugin($core,$ns);
|
||||
|
||||
# Delete plugins
|
||||
if ($type == 'plugins' && $action == 'delete')
|
||||
self::deletePlugin($core,$ns);
|
||||
|
||||
# Empty themes
|
||||
if ($type == 'themes' && $action == 'empty')
|
||||
self::emptyTheme($core,$ns);
|
||||
|
||||
# Delete themes
|
||||
if ($type == 'themes' && $action == 'delete')
|
||||
self::deleteTheme($core,$ns);
|
||||
|
||||
# Empty caches
|
||||
if ($type == 'caches' && $action == 'empty')
|
||||
self::emptyCache($core,$ns);
|
||||
|
||||
# Delete caches
|
||||
if ($type == 'caches' && $action == 'delete')
|
||||
self::deleteCache($core,$ns);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$errors = self::$errors;
|
||||
if (isset($errors[$type][$action])) {
|
||||
throw new Exception(__($errors[$type][$action]));
|
||||
}
|
||||
else {
|
||||
throw new Exception(sprintf(__('Cannot execute "%s" of type "%s"'),$action,$type));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected static function getDirs($roots)
|
||||
{
|
||||
if (!is_array($roots))
|
||||
$roots = array($roots);
|
||||
|
||||
$rs = array();
|
||||
$i = 0;
|
||||
foreach ($roots as $root) {
|
||||
|
||||
$dirs = files::scanDir($root);
|
||||
foreach($dirs as $k) {
|
||||
|
||||
if ('.' == $k || '..' == $k || !is_dir($root.'/'.$k)) continue;
|
||||
|
||||
$rs[$i]['key'] = $k;
|
||||
$rs[$i]['value'] = count(self::scanDir($root.'/'.$k));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $rs;
|
||||
}
|
||||
|
||||
protected static function delDir($roots,$folder,$delfolder=true)
|
||||
{
|
||||
if (strpos($folder,'/'))
|
||||
return false;
|
||||
|
||||
if (!is_array($roots))
|
||||
$roots = array($roots);
|
||||
|
||||
foreach ($roots as $root)
|
||||
{
|
||||
if (file_exists($root.'/'.$folder))
|
||||
return self::delTree($root.'/'.$folder,$delfolder);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static function scanDir($path,$dir='',$res=array())
|
||||
{
|
||||
$exclude = self::$exclude;
|
||||
|
||||
$path = path::real($path);
|
||||
if (!is_dir($path) || !is_readable($path)) return array();
|
||||
|
||||
$files = files::scandir($path);
|
||||
|
||||
foreach($files AS $file) {
|
||||
if (in_array($file,$exclude)) continue;
|
||||
|
||||
if (is_dir($path.'/'.$file)) {
|
||||
|
||||
$res[] = $file;
|
||||
$res = self::scanDir($path.'/'.$file,$dir.'/'.$file,$res);
|
||||
} else {
|
||||
|
||||
$res[] = empty($dir) ? $file : $dir.'/'.$file;
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
protected static function delTree($dir,$delroot=true)
|
||||
{
|
||||
if (!is_dir($dir) || !is_readable($dir)) return false;
|
||||
|
||||
if (substr($dir,-1) != '/') $dir .= '/';
|
||||
|
||||
if (($d = @dir($dir)) === false) return false;
|
||||
|
||||
while (($entryname = $d->read()) !== false)
|
||||
{
|
||||
if ($entryname != '.' && $entryname != '..')
|
||||
{
|
||||
if (is_dir($dir.'/'.$entryname))
|
||||
{
|
||||
if (!self::delTree($dir.'/'.$entryname)) return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!@unlink($dir.'/'.$entryname)) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
||||
if ($delroot)
|
||||
return @rmdir($dir);
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,354 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_ADMIN_CONTEXT')){return;}
|
||||
|
||||
/**
|
||||
@brief Modules uninstall features handler
|
||||
|
||||
Provides an object to handle modules uninstall features
|
||||
(themes or plugins).
|
||||
This class used dcAdvancedCleaner.
|
||||
*/
|
||||
class dcUninstaller
|
||||
{
|
||||
protected $path;
|
||||
|
||||
protected $modules = array(); ///< <b>array</b> Modules informations array
|
||||
protected $actions = array('user'=>array(),'callback'=>array());
|
||||
protected $callbacks = array('user'=>array(),'callback'=>array());
|
||||
|
||||
protected $id = null;
|
||||
protected $mroot = null;
|
||||
|
||||
/**
|
||||
Array of all allowed properties to uninstall parts of modules.
|
||||
'settings' : settings set on dcSettings,
|
||||
'tables' : if module creates table,
|
||||
'plugins' : if module has files on plugin path,
|
||||
'themes' : if module has files on theme path, (on current blog)
|
||||
'caches' : if module has files on DC caches path,
|
||||
'versions' : if module set a versions on DC table 'version'
|
||||
*/
|
||||
protected static $allowed_properties = array(
|
||||
'versions' => array(
|
||||
'delete' => 'delete version in dc'
|
||||
),
|
||||
'settings' => array(
|
||||
'delete_global' => 'delete global settings',
|
||||
'delete_local' => 'delete local settings',
|
||||
'delete_all' => 'delete all settings'
|
||||
),
|
||||
'tables' => array(
|
||||
'empty' => 'empty table',
|
||||
'delete' => 'delete table'
|
||||
),
|
||||
'plugins' => array(
|
||||
'empty' => 'empty plugin folder',
|
||||
'delete' => 'delete plugin folder'
|
||||
),
|
||||
'themes' => array(
|
||||
'empty' => 'empty theme folder',
|
||||
'delete' => 'delete theme folder'
|
||||
),
|
||||
'caches' => array(
|
||||
'empty' => 'empty cache folder',
|
||||
'delete' => 'delete cache folder'
|
||||
)
|
||||
);
|
||||
|
||||
protected static $priority_properties = array(
|
||||
'versions','settings','tables','themes','plugins','caches'
|
||||
);
|
||||
|
||||
public $core; ///< <b>dcCore</b> dcCore instance
|
||||
|
||||
/**
|
||||
Object constructor.
|
||||
|
||||
@param core <b>dcCore</b> dcCore instance
|
||||
*/
|
||||
public function __construct($core)
|
||||
{
|
||||
$this->core =& $core;
|
||||
}
|
||||
|
||||
public static function getAllowedProperties()
|
||||
{
|
||||
return self::$allowed_properties;
|
||||
}
|
||||
|
||||
/**
|
||||
Loads modules.
|
||||
Files _defines.php and _uninstall.php must be present on module
|
||||
to be recognized.
|
||||
(path separator depends on your OS).
|
||||
|
||||
@param path <b>string</b> Separated list of paths
|
||||
*/
|
||||
public function loadModules($path)
|
||||
{
|
||||
$this->path = explode(PATH_SEPARATOR,$path);
|
||||
|
||||
foreach ($this->path as $root)
|
||||
{
|
||||
if (!is_dir($root) || !is_readable($root)) continue;
|
||||
|
||||
if (substr($root,-1) != '/') $root .= '/';
|
||||
|
||||
if (($d = @dir($root)) === false) continue;
|
||||
|
||||
while (($entry = $d->read()) !== false)
|
||||
{
|
||||
$full_entry = $root.'/'.$entry;
|
||||
|
||||
if ($entry != '.' && $entry != '..' && is_dir($full_entry))
|
||||
{
|
||||
$this->loadModule($full_entry);
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
}
|
||||
|
||||
# Sort modules by name
|
||||
uasort($this->modules,array($this,'sortModules'));
|
||||
}
|
||||
|
||||
/**
|
||||
Load one module.
|
||||
Files _defines.php and _uninstall.php must be present on module
|
||||
to be recognized.
|
||||
|
||||
@param root <b>string</b> path of module
|
||||
*/
|
||||
public function loadModule($root)
|
||||
{
|
||||
if (file_exists($root.'/_define.php')
|
||||
&& file_exists($root.'/_uninstall.php')) {
|
||||
|
||||
$this->id = basename($root);
|
||||
$this->mroot = $root;
|
||||
|
||||
require $root.'/_define.php';
|
||||
require $root.'/_uninstall.php';
|
||||
|
||||
$this->id = null;
|
||||
$this->mroot = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
This method registers a module in modules list. You should use
|
||||
this to register a new module.
|
||||
|
||||
@param name <b>string</b> Module name
|
||||
@param desc <b>string</b> Module description
|
||||
@param author <b>string</b> Module author name
|
||||
@param version <b>string</b> Module version
|
||||
*/
|
||||
public function registerModule($name,$desc,$author,$version)
|
||||
{
|
||||
if ($this->id) {
|
||||
$this->modules[$this->id] = array(
|
||||
'root' => $this->mroot,
|
||||
'name' => $name,
|
||||
'desc' => $desc,
|
||||
'author' => $author,
|
||||
'version' => $version,
|
||||
'root_writable' => is_writable($this->mroot)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Returns all modules associative array or only one module if <var>$id</var>
|
||||
is present.
|
||||
|
||||
@param id <b>string</b> Optionnal module ID
|
||||
@return <b>array</b>
|
||||
*/
|
||||
public function getModules($id=null)
|
||||
{
|
||||
if ($id && isset($this->modules[$id])) {
|
||||
return $this->modules[$id];
|
||||
}
|
||||
return $this->modules;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns true if the module with ID <var>$id</var> exists.
|
||||
|
||||
@param id <b>string</b> Module ID
|
||||
@return <b>boolean</b>
|
||||
*/
|
||||
public function moduleExists($id)
|
||||
{
|
||||
return isset($this->modules[$id]);
|
||||
}
|
||||
|
||||
/**
|
||||
Add a predefined action to unsintall features.
|
||||
This action is set in _uninstall.php.
|
||||
|
||||
@param type <b>string</b> Type of action (from $allowed_properties)
|
||||
@param action <b>string</b> Action (from $allowed_properties)
|
||||
@param ns <b>string</b> Name of setting related to module.
|
||||
@param desc <b>string</b> Description of action
|
||||
*/
|
||||
protected function addUserAction($type,$action,$ns,$desc='')
|
||||
{
|
||||
$this->addAction('user',$type,$action,$ns,$desc);
|
||||
}
|
||||
|
||||
protected function addDirectAction($type,$action,$ns,$desc='')
|
||||
{
|
||||
$this->addAction('direct',$type,$action,$ns,$desc);
|
||||
}
|
||||
|
||||
private function addAction($group,$type,$action,$ns,$desc)
|
||||
{
|
||||
$group = self::group($group);
|
||||
|
||||
if (null === $this->id) return;
|
||||
|
||||
if (empty($type) || empty($ns)) return;
|
||||
|
||||
if (!isset(self::$allowed_properties[$type][$action])) return;
|
||||
|
||||
if (empty($desc)) $desc = __($action);
|
||||
|
||||
$this->actions[$group][$this->id][$type][] = array(
|
||||
'ns' => $ns,
|
||||
'action' => $action,
|
||||
'desc' => $desc
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
Returns modules <var>$id</var> predefined actions associative array
|
||||
ordered by priority
|
||||
|
||||
@param id <b>string</b> Optionnal module ID
|
||||
@return <b>array</b>
|
||||
*/
|
||||
public function getUserActions($id)
|
||||
{
|
||||
return $this->getActions('user',$id);
|
||||
}
|
||||
|
||||
public function getDirectActions($id)
|
||||
{
|
||||
return $this->getActions('direct',$id);
|
||||
}
|
||||
|
||||
protected function getActions($group,$id)
|
||||
{
|
||||
$group = self::group($group);
|
||||
|
||||
if (!isset($this->actions[$group][$id])) return array();
|
||||
|
||||
$res = array();
|
||||
foreach(self::$priority_properties as $k => $v)
|
||||
{
|
||||
if (!isset($this->actions[$group][$id][$v])) continue;
|
||||
$res[$v] = $this->actions[$group][$id][$v];
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
Add a callable function for unsintall features.
|
||||
This action is set in _uninstall.php.
|
||||
|
||||
@param func <b>string</b> Callable function
|
||||
@param desc <b>string</b> Description of action
|
||||
*/
|
||||
protected function addUserCallback($func,$desc='')
|
||||
{
|
||||
$this->addCallback('user',$func,$desc);
|
||||
}
|
||||
|
||||
protected function addDirectCallback($func,$desc='')
|
||||
{
|
||||
$this->addCallback('direct',$func,$desc);
|
||||
}
|
||||
|
||||
private function addCallback($group,$func,$desc)
|
||||
{
|
||||
$group = self::group($group);
|
||||
|
||||
if (null === $this->id) return;
|
||||
|
||||
if (empty($desc)) $desc = __('extra action');
|
||||
|
||||
if (!is_callable($func)) return;
|
||||
|
||||
$this->callbacks[$group][$this->id][] = array(
|
||||
'func' => $func,
|
||||
'desc' => $desc
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
Returns modules <var>$id</var> callback actions associative array
|
||||
|
||||
@param id <b>string</b> Optionnal module ID
|
||||
@return <b>array</b>
|
||||
*/
|
||||
public function getUserCallbacks($id)
|
||||
{
|
||||
return $this->getCallbacks('user',$id);
|
||||
}
|
||||
|
||||
public function getDirectCallbacks($id)
|
||||
{
|
||||
return $this->getCallbacks('direct',$id);
|
||||
}
|
||||
|
||||
protected function getCallbacks($group,$id)
|
||||
{
|
||||
$group = self::group($group);
|
||||
|
||||
if (!isset($this->callbacks[$group][$id])) return array();
|
||||
|
||||
return $this->callbacks[$group][$id];
|
||||
}
|
||||
|
||||
/**
|
||||
Execute a predifined action. This function call dcAdvancedCleaner
|
||||
to do actions.
|
||||
|
||||
@param type <b>string</b> Type of action (from $allowed_properties)
|
||||
@param action <b>string</b> Action (from $allowed_properties)
|
||||
@param ns <b>string</b> Name of setting related to module.
|
||||
@return <b>array</b>
|
||||
*/
|
||||
public function execute($type,$action,$ns)
|
||||
{
|
||||
$prop = $this->getAllowedProperties();
|
||||
|
||||
if (!isset($prop[$type][$action]) || empty($ns)) return;
|
||||
|
||||
dcAdvancedCleaner::execute($this->core,$type,$action,$ns);
|
||||
}
|
||||
|
||||
private function sortModules($a,$b)
|
||||
{
|
||||
return strcasecmp($a['name'],$b['name']);
|
||||
}
|
||||
|
||||
private function group($group)
|
||||
{
|
||||
return in_array($group,array('user','direct')) ? $group : null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')){return;}
|
||||
|
||||
# This file is used with plugin activityReport
|
||||
$core->activityReport->addGroup('dcadvancedcleaner',__('Plugin dcAdvancedCleaner'));
|
||||
|
||||
# from BEHAVIOR dcAdvancedCleanerBeforeAction
|
||||
# in dcAdvancedCleaner/inc/class.dc.advanced.cleaner.php
|
||||
$core->activityReport->addAction(
|
||||
'dcadvancedcleaner',
|
||||
'maintenance',
|
||||
__('Maintenance'),
|
||||
__('New action from dcAdvancedCleaner has been made with type="%s", action="%s", ns="%s".'),
|
||||
'dcAdvancedCleanerBeforeAction',
|
||||
array('dcAdvancedCleanerActivityReportBehaviors','maintenance')
|
||||
);
|
||||
|
||||
class dcAdvancedCleanerActivityReportBehaviors
|
||||
{
|
||||
public static function maintenance($type,$action,$ns)
|
||||
{
|
||||
$logs = array($type,$action,$ns);
|
||||
|
||||
$GLOBALS['core']->activityReport->addLog('dcadvancedcleaner','maintenance',$logs);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,224 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_ADMIN_CONTEXT')){return;}
|
||||
|
||||
class behaviorsDcAdvancedCleaner
|
||||
{
|
||||
public static function pluginsBeforeDelete($plugin)
|
||||
{
|
||||
self::moduleBeforeDelete($plugin,'plugins.php?removed=1');
|
||||
}
|
||||
|
||||
public static function themeBeforeDelete($theme)
|
||||
{
|
||||
self::moduleBeforeDelete($theme,'blog_theme.php?del=1');
|
||||
}
|
||||
|
||||
# Generic module before delete
|
||||
public static function moduleBeforeDelete($module,$redir)
|
||||
{
|
||||
global $core;
|
||||
$done = false;
|
||||
|
||||
if (!$core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_behavior_active) return;
|
||||
|
||||
$uninstaller = new dcUninstaller($core);
|
||||
$uninstaller->loadModule($module['root']);
|
||||
|
||||
$m_callbacks = $uninstaller->getDirectCallbacks($module['id']);
|
||||
$m_actions = $uninstaller->getDirectActions($module['id']);
|
||||
|
||||
foreach($m_callbacks as $k => $callback)
|
||||
{
|
||||
if (!isset($callback['func']) || !is_callable($callback['func'])) continue;
|
||||
|
||||
call_user_func($callback['func'],$module);
|
||||
$done = true;
|
||||
}
|
||||
|
||||
foreach($m_actions as $type => $actions)
|
||||
{
|
||||
foreach($actions as $v)
|
||||
{
|
||||
$uninstaller->execute($type,$v['action'],$v['ns']);
|
||||
$done = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($done) {
|
||||
http::redirect($redir);
|
||||
}
|
||||
}
|
||||
|
||||
public static function dcAdvancedCleanerAdminTabs($core,$p_url)
|
||||
{
|
||||
self::modulesTabs($core,DC_PLUGINS_ROOT,$p_url.'&tab=uninstaller');
|
||||
}
|
||||
|
||||
public static function pluginsToolsTabs($core)
|
||||
{
|
||||
self::modulesTabs($core,DC_PLUGINS_ROOT,'plugins.php?tab=uninstaller');
|
||||
}
|
||||
|
||||
# Generic module tabs
|
||||
public static function modulesTabs($core,$path,$redir,$title='')
|
||||
{
|
||||
if (!$core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_behavior_active) return;
|
||||
|
||||
$err = '';
|
||||
$title = empty($title) ? __('Advanced uninstall') : $title;
|
||||
|
||||
$uninstaller = new dcUninstaller($core);
|
||||
$uninstaller->loadModules($path);
|
||||
$modules = $uninstaller->getModules();
|
||||
$props = $uninstaller->getAllowedProperties();
|
||||
|
||||
# Execute
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'uninstall'
|
||||
&& (!empty($_POST['extras']) || !empty($_POST['actions']))) {
|
||||
|
||||
try {
|
||||
# Extras
|
||||
if (!empty($_POST['extras'])) {
|
||||
foreach($_POST['extras'] as $module_id => $extras)
|
||||
{
|
||||
foreach($extras as $k => $sentence)
|
||||
{
|
||||
$extra = @unserialize(@base64_decode($sentence));
|
||||
|
||||
if (!$extra || !is_callable($extra)) continue;
|
||||
|
||||
call_user_func($extra,$modul_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
# Actions
|
||||
if (!empty($_POST['actions'])) {
|
||||
foreach($_POST['actions'] as $module_id => $actions)
|
||||
{
|
||||
foreach($actions as $k => $sentence)
|
||||
{
|
||||
$action = @unserialize(@base64_decode($sentence));
|
||||
|
||||
if (!$action
|
||||
|| !isset($action['type'])
|
||||
|| !isset($action['action'])
|
||||
|| !isset($action['ns'])) continue;
|
||||
|
||||
$uninstaller->execute($action['type'],$action['action'],$action['ns']);
|
||||
}
|
||||
}
|
||||
}
|
||||
http::redirect($redir.'&msg=1');
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$err = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
echo
|
||||
'<div class="multi-part" id="uninstaller" title="'.__($title).'">';
|
||||
|
||||
if($err)
|
||||
echo '<p class="error">'.$err.'</p>';
|
||||
|
||||
if(!count($modules)) {
|
||||
echo '<p>'.__('There is no module with uninstall features').'</p></div>';
|
||||
return;
|
||||
}
|
||||
|
||||
echo
|
||||
'<p>'.__('List of modules with advanced uninstall features').'</p>'.
|
||||
'<form method="post" action="'.$redir.'">'.
|
||||
'<table class="clear"><tr>'.
|
||||
'<th>'.__('id').'</th>'.
|
||||
'<th>'.__('n°').'</th>';
|
||||
|
||||
foreach($props as $pro_id => $prop) {
|
||||
echo '<th>'.__($pro_id).'</th>';
|
||||
}
|
||||
|
||||
echo
|
||||
'<th>'.__('extra').'</th>'.
|
||||
'</tr>';
|
||||
|
||||
$i = 0;
|
||||
foreach($modules as $module_id => $module) {
|
||||
|
||||
echo
|
||||
'<tr class="line">'.
|
||||
'<td class="nowrap">'.$module_id.'</td>'.
|
||||
'<td class="nowrap">'.$module['version'].'</td>';
|
||||
|
||||
$actions = $uninstaller->getUserActions($module_id);
|
||||
|
||||
foreach($props as $prop_id => $prop) {
|
||||
echo '<td class="nowrap">';
|
||||
|
||||
if (!isset($actions[$prop_id])) {
|
||||
echo '--</td>';
|
||||
continue;
|
||||
}
|
||||
|
||||
$j = 0;
|
||||
foreach($actions[$prop_id] as $action_id => $action) {
|
||||
|
||||
if (!isset($props[$prop_id][$action['action']])) continue;
|
||||
|
||||
$ret = base64_encode(serialize(array(
|
||||
'type' => $prop_id,
|
||||
'action'=>$action['action'],
|
||||
'ns'=>$action['ns']
|
||||
)));
|
||||
|
||||
echo '<label class="classic">'.
|
||||
form::checkbox(array('actions['.$module_id.']['.$j.']'),$ret).
|
||||
' '.$action['desc'].'</label><br />';
|
||||
|
||||
$j++;
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
echo '<td class="nowrap">';
|
||||
|
||||
$callbacks = $uninstaller->getUserCallbacks($module_id);
|
||||
|
||||
if (empty($callbacks)) {
|
||||
echo '--';
|
||||
}
|
||||
|
||||
$k = 0;
|
||||
foreach($callbacks as $callback_id => $callback) {
|
||||
|
||||
$ret = base64_encode(serialize($callback['func']));
|
||||
|
||||
echo '<label class="classic">'.
|
||||
form::checkbox(array('extras['.$module_id.']['.$k.']'),$ret).
|
||||
' '.$callback['desc'].'</label><br />';
|
||||
}
|
||||
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo
|
||||
'</table>'.
|
||||
'<p>'.
|
||||
$core->formNonce().
|
||||
form::hidden(array('redir'),$redir).
|
||||
form::hidden(array('action'),'uninstall').
|
||||
'<input type="submit" name="submit" value="'.__('Perform selected actions').'" /> '.
|
||||
'</p>'.
|
||||
'</form>'.
|
||||
'</div>';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,282 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2018 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')){return;}
|
||||
|
||||
if (!$core->auth->isSuperAdmin()){return;}
|
||||
|
||||
$page_title = __('Advanced cleaner');
|
||||
|
||||
# Lists
|
||||
function drawDcAdvancedCleanerLists($core,$type)
|
||||
{
|
||||
$combo_funcs = array(
|
||||
'settings' => array('dcAdvancedCleaner','getSettings'),
|
||||
'tables' => array('dcAdvancedCleaner','getTables'),
|
||||
'plugins' => array('dcAdvancedCleaner','getPlugins'),
|
||||
'themes' => array('dcAdvancedCleaner','getThemes'),
|
||||
'caches' => array('dcAdvancedCleaner','getCaches'),
|
||||
'versions' => array('dcAdvancedCleaner','getVersions')
|
||||
);
|
||||
$combo_actions = array(
|
||||
'settings' => array(
|
||||
__('delete global settings') => 'delete_global',
|
||||
__('delete blog settings') => 'delete_local',
|
||||
__('delete all settings') =>'delete_all'
|
||||
),
|
||||
'tables' => array(
|
||||
__('delete') => 'delete',
|
||||
__('empty') => 'empty'
|
||||
),
|
||||
'plugins' => array(
|
||||
__('delete') => 'delete',
|
||||
__('empty') => 'empty'
|
||||
),
|
||||
'themes' => array(
|
||||
__('delete') => 'delete',
|
||||
__('empty') => 'empty'
|
||||
),
|
||||
'caches' => array(
|
||||
__('delete') => 'delete',
|
||||
__('empty') => 'empty'
|
||||
),
|
||||
'versions' => array(
|
||||
__('delete') => 'delete'
|
||||
)
|
||||
);
|
||||
$combo_help = array(
|
||||
'settings' => __('Namespaces registered in dcSettings'),
|
||||
'tables' => __('All database tables of Dotclear'),
|
||||
'plugins' => __('Folders from plugins directories'),
|
||||
'themes' => __('Folders from blog themes directory'),
|
||||
'caches' => __('Folders from cache directory'),
|
||||
'versions' => __('Versions registered in table "version" of Dotclear')
|
||||
);
|
||||
|
||||
if (!isset($combo_funcs[$type])) return '';
|
||||
|
||||
$rs = call_user_func($combo_funcs[$type],$core);
|
||||
|
||||
echo
|
||||
'<div class="listDcAdvancedCleaner">'.
|
||||
'<p class="form-note">'.$combo_help[$type].'</p>';
|
||||
|
||||
if (empty($rs)) {
|
||||
echo
|
||||
'<p>'.sprintf(__('There is no %s'),__(substr($type,0,-1))).'</p>';
|
||||
} else {
|
||||
|
||||
echo
|
||||
'<p>'.sprintf(__('There are %s %s'),count($rs),__($type)).'</p>'.
|
||||
'<form method="post" action="plugin.php?p=dcAdvancedCleaner&tab=lists&part='.$type.'">'.
|
||||
'<table><thead><tr>'.
|
||||
'<th>'.__('Name').'</th><th>'.__('Objects').'</th>'.
|
||||
'</tr></thead><tbody>';
|
||||
|
||||
foreach($rs as $k => $v)
|
||||
{
|
||||
$offline = in_array($v['key'],dcAdvancedCleaner::$dotclear[$type]);
|
||||
|
||||
if ($core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_dcproperty_hide && $offline) continue;
|
||||
|
||||
echo
|
||||
'<tr class="line'.
|
||||
($offline ? ' offline' : '').
|
||||
'">'.
|
||||
'<td class="nowrap"><label class="classic">'.
|
||||
form::checkbox(array('entries['.$k.']'),html::escapeHTML($v['key'])).' '.$v['key'].'</label></td>'.
|
||||
'<td class="nowrap">'.$v['value'].'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
|
||||
echo
|
||||
'</tbody></table>'.
|
||||
'<p>'.__('Action on selected rows:').'<br />'.
|
||||
form::combo(array('action'),$combo_actions[$type]).
|
||||
'<input type="submit" value="'.__('ok').'" />'.
|
||||
form::hidden(array('p'),'dcAdvancedCleaner').
|
||||
form::hidden(array('tab'),'lists').
|
||||
form::hidden(array('part'),$type).
|
||||
form::hidden(array('type'),$type).
|
||||
$core->formNonce().'</p>'.
|
||||
'</form>';
|
||||
}
|
||||
echo
|
||||
'<div>';
|
||||
}
|
||||
|
||||
# Localized l10n
|
||||
__('Settings'); __('settings'); __('setting');
|
||||
__('Tables'); __('tables'); __('table');
|
||||
__('Plugins'); __('plugins'); __('plugin');
|
||||
__('Themes'); __('themes'); __('theme');
|
||||
__('Caches'); __('caches'); __('cache');
|
||||
__('Versions'); __('versions'); __('version');
|
||||
__('delete table');
|
||||
__('delete cache files');
|
||||
__('delete plugin files');
|
||||
__('delete theme files');
|
||||
__('delete the version number');
|
||||
__('Uninstall extensions');
|
||||
__('delete %s blog settings');
|
||||
__('delete %s global settings');
|
||||
__('delete all %s settings');
|
||||
__('delete %s table');
|
||||
__('delete %s version number');
|
||||
__('delete %s plugin files');
|
||||
__('delete %s theme file');
|
||||
__('delete %s cache files');
|
||||
|
||||
# vars
|
||||
$msg = isset($_GET['msg']) ? true : false;
|
||||
$tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : 'dcac';
|
||||
$part = isset($_REQUEST['part']) ? $_REQUEST['part'] : 'caches';
|
||||
$entries = isset($_POST['entries']) ? $_POST['entries'] : '';
|
||||
$action = isset($_POST['action']) ? $_POST['action'] : '';
|
||||
$type = isset($_POST['type']) ? $_POST['type'] : '';
|
||||
$s = $core->blog->settings->dcAdvancedCleaner;
|
||||
|
||||
# Combos
|
||||
$combo_title = array(
|
||||
'settings' => __('Settings'),
|
||||
'tables' => __('Tables'),
|
||||
'plugins' => __('Extensions'),
|
||||
'themes' => __('Themes'),
|
||||
'caches' => __('Cache'),
|
||||
'versions' => __('Versions')
|
||||
);
|
||||
|
||||
$combo_type = array(
|
||||
'settings' => array('delete_global','delete_local','delete_all'),
|
||||
'tables' => array('empty','delete'),
|
||||
'plugins' => array('empty','delete'),
|
||||
'themes' => array('empty','delete'),
|
||||
'caches' => array('empty','delete'),
|
||||
'versions' => array('delete')
|
||||
);
|
||||
|
||||
# This plugin settings
|
||||
if ($tab == 'dcac' && $action == 'dcadvancedcleaner_settings')
|
||||
{
|
||||
try {
|
||||
$s->put('dcAdvancedCleaner_behavior_active',isset($_POST['dcadvancedcleaner_behavior_active']),'boolean');
|
||||
$s->put('dcAdvancedCleaner_dcproperty_hide',isset($_POST['dcadvancedcleaner_dcproperty_hide']),'boolean');
|
||||
|
||||
http::redirect($p_url.'&tab=dcac&part=dcac&part=&msg=done');
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
# Actions
|
||||
if ($tab == 'lists' && !empty($entries)
|
||||
&& isset($combo_type[$type])
|
||||
&& in_array($action,$combo_type[$type])) {
|
||||
|
||||
try {
|
||||
foreach($entries as $v) {
|
||||
dcAdvancedCleaner::execute($core,$type,$action,$v);
|
||||
}
|
||||
|
||||
http::redirect($p_url.'&tab=lists&part='.$part.'&msg=done');
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<html><head>
|
||||
<title>'.$page_title.'</title>
|
||||
<link rel="stylesheet" type="text/css" href="index.php?pf=dcAdvancedCleaner/style.css" />'.
|
||||
dcPage::jsToolBar().
|
||||
dcPage::jsPageTabs($tab).'
|
||||
</style>';
|
||||
|
||||
# --BEHAVIOR-- dcAdvancedCleanerAdminHeader
|
||||
$core->callBehavior('dcAdvancedCleanerAdminHeader',$core,$p_url,$tab);
|
||||
|
||||
echo '
|
||||
</head><body>'.
|
||||
dcPage::breadcrumb(
|
||||
array(
|
||||
html::escapeHTML($core->blog->name) => '',
|
||||
'<span class="page-title">'.$page_title.'</span>' => ''
|
||||
));
|
||||
echo
|
||||
'<p class="error">'.__('Beware: All actions done here are irreversible and are directly applied').'</p>';
|
||||
|
||||
# Information message
|
||||
if (!empty($msg)) {
|
||||
dcPage::success(__('Action successfully done'));
|
||||
}
|
||||
|
||||
echo '<div class="multi-part" id="lists" title="'.__('Records and folders').'">'.
|
||||
'<p>';
|
||||
foreach($combo_title as $k => $v)
|
||||
{
|
||||
echo '<a class="button" href="'.$p_url.'&tab=lists&part='.$k.'">'.$v.'</a> ';
|
||||
}
|
||||
echo '</p>';
|
||||
|
||||
# Load "part" page
|
||||
if (isset($combo_title[$part]))
|
||||
{
|
||||
echo '<fieldset><legend>'.$combo_title[$part].'</legend>';
|
||||
drawDcAdvancedCleanerLists($core,$part);
|
||||
echo '</fieldset>';
|
||||
}
|
||||
if ($s->dcAdvancedCleaner_dcproperty_hide)
|
||||
{
|
||||
echo '<p class="info">'.__('Default values of Dotclear are hidden. You can change this in settings tab').'</p>';
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
# --BEHAVIOR-- dcAdvancedCleanerAdminTabs
|
||||
$core->callBehavior('dcAdvancedCleanerAdminTabs',$core,$p_url);
|
||||
|
||||
echo '
|
||||
<div class="multi-part" id="dcac" title="'.__('This plugin settings').'">
|
||||
<fieldset><legend>'.__('This plugin settings').'</legend>
|
||||
<form method="post" action="'.$p_url.'&tab=dcac&part=">
|
||||
<p><label class="classic" for="dcadvancedcleaner_behavior_active">'.
|
||||
form::checkbox('dcadvancedcleaner_behavior_active',1,
|
||||
$s->dcAdvancedCleaner_behavior_active).
|
||||
__('Activate behaviors').'</label></p>
|
||||
<p class="form-note">'.__('Enable actions set in _uninstall.php files.').'</p>
|
||||
<p><label class="classic" for="dcadvancedcleaner_dcproperty_hide">'.
|
||||
form::checkbox('dcadvancedcleaner_dcproperty_hide',1,
|
||||
$s->dcAdvancedCleaner_dcproperty_hide).
|
||||
__('Hide Dotclear default properties in actions tabs').'
|
||||
</label></p>
|
||||
<p class="form-note">'.__('Prevent from deleting Dotclear important properties.').'</p>
|
||||
<p><input type="submit" name="submit" value="'.__('Save').'" />'.
|
||||
form::hidden(array('p'),'dcAdvancedCleaner').
|
||||
form::hidden(array('tab'),'dcac').
|
||||
form::hidden(array('part'),'').
|
||||
form::hidden(array('action'),'dcadvancedcleaner_settings').
|
||||
$core->formNonce().'</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>';
|
||||
|
||||
dcPage::helpBlock('dcAdvancedCleaner');
|
||||
echo '
|
||||
<hr class="clear"/>
|
||||
<p class="right">
|
||||
<a class="button" href="'.$p_url.'&part=dcac">'.__('settings').'</a> -
|
||||
dcAdvancedCleaner - '.$core->plugins->moduleInfo('dcAdvancedCleaner','version').'
|
||||
<img alt="dcMiniUrl" src="index.php?pf=dcAdvancedCleaner/icon.png" />
|
||||
</p>
|
||||
</body></html>';
|
||||
?>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Help for dcAdvancedCleaner</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>If you want some help or contribute to the plugin dcAdvancedCleaner, follow these links.</p>
|
||||
<ul>
|
||||
<li><a href="https://forum.dotclear.org/viewtopic.php?id=40381" title="Forum">Post on Dotclear's forum</a></li>
|
||||
<li><a href="http://lab.dotclear.org/wiki/plugin/dcAdvancedCleaner" title="Lab">Page on Dotclear's lab</a></li>
|
||||
<li><a href="http://dotclear.jcdenis.com/go/dcAdvancedCleaner" title="Blog">Post on author's blog</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
if (!defined('DC_RC_PATH')){return;}
|
||||
if (!isset($__resources['help']['dcAdvancedCleaner']))
|
||||
{
|
||||
$__resources['help']['dcAdvancedCleaner'] = dirname(__FILE__).'/help/dcAdvancedCleaner.html';
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Aide for dcAdvancedCleaner</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Si vous souhaitez plus d'aide ou apporter votre contribution au plugin dcAdvancedCleaner, voici quelques liens utiles.</p>
|
||||
<ul>
|
||||
<li><a href="https://forum.dotclear.org/viewtopic.php?id=40381" title="Forum">Sujet sur le forum Dotclear</a></li>
|
||||
<li><a href="http://lab.dotclear.org/wiki/plugin/dcAdvancedCleaner" title="Lab">Page dédiée du lab Dotclear</a></li>
|
||||
<li><a href="http://dotclear.jcdenis.com/go/dcAdvancedCleaner" title="Blog">Billet dédié sur le blog de l'auteur</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,192 @@
|
|||
<?php
|
||||
// Language: Français
|
||||
// Module: dcAdvancedCleaner - 0.6.1
|
||||
// Date: 2018-01-24 16:01:10
|
||||
// Translated with dcTranslater - 2017.05.10
|
||||
|
||||
#_admin.php:16
|
||||
#_admin.php:28
|
||||
#index.php:17
|
||||
$GLOBALS['__l10n']['Advanced cleaner'] = 'Nettoyeur avancé';
|
||||
|
||||
#inc/class.dc.advanced.cleaner.php:297
|
||||
$GLOBALS['__l10n']['Cannot execute "%s" of type "%s"'] = 'Impossible d\'exécuter "%s" de type "%s"';
|
||||
|
||||
#inc/class.dc.uninstaller.php:292
|
||||
$GLOBALS['__l10n']['extra action'] = 'Action additionnelle';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.activityreport.php:16
|
||||
$GLOBALS['__l10n']['Plugin dcAdvancedCleaner'] = 'Plugin dcAdvancedCleaner';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.activityreport.php:24
|
||||
$GLOBALS['__l10n']['New action from dcAdvancedCleaner has been made with type="%s", action="%s", ns="%s".'] = 'Une nouvelle action depuis dcAdvancedCleaner a été effectuée avec : type="%s", action="%s", ns="%s"';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:79
|
||||
$GLOBALS['__l10n']['Advanced uninstall'] = 'Désinstallation avancée';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:136
|
||||
$GLOBALS['__l10n']['There is no module with uninstall features'] = 'Il n\'y a pas de module avec des fonctions de désinstallation avancée';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:141
|
||||
$GLOBALS['__l10n']['List of modules with advanced uninstall features'] = 'Liste des modules avec des fonctions de désinstallation avancée';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:144
|
||||
$GLOBALS['__l10n']['id'] = 'id';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:145
|
||||
$GLOBALS['__l10n']['n°'] = 'n°';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:152
|
||||
$GLOBALS['__l10n']['extra'] = 'extra';
|
||||
|
||||
#inc/lib.dc.advanced.cleaner.behaviors.php:219
|
||||
$GLOBALS['__l10n']['Perform selected actions'] = 'Effectuer les actions sélectionnées';
|
||||
|
||||
#index.php:32
|
||||
$GLOBALS['__l10n']['delete global settings'] = 'effacer les paramètres globaux';
|
||||
|
||||
#index.php:33
|
||||
$GLOBALS['__l10n']['delete blog settings'] = 'effacer les paramètres du blog';
|
||||
|
||||
#index.php:34
|
||||
$GLOBALS['__l10n']['delete all settings'] = 'effacer tous les paramètres';
|
||||
|
||||
#index.php:38
|
||||
#index.php:42
|
||||
#index.php:46
|
||||
#index.php:50
|
||||
$GLOBALS['__l10n']['empty'] = 'vider';
|
||||
|
||||
#index.php:57
|
||||
$GLOBALS['__l10n']['Namespaces registered in dcSettings'] = 'Espaces de nom (namespaces) enregistrés dans dcSettings';
|
||||
|
||||
#index.php:58
|
||||
$GLOBALS['__l10n']['All database tables of Dotclear'] = 'Toutes les tables Dotclear de la base de données';
|
||||
|
||||
#index.php:59
|
||||
$GLOBALS['__l10n']['Folders from plugins directories'] = 'Dossiers des répertoires des plugins';
|
||||
|
||||
#index.php:60
|
||||
$GLOBALS['__l10n']['Folders from blog themes directory'] = 'Dossiers du répertoire des thèmes du blog';
|
||||
|
||||
#index.php:61
|
||||
$GLOBALS['__l10n']['Folders from cache directory'] = 'Dossiers du répertoire de cache';
|
||||
|
||||
#index.php:62
|
||||
$GLOBALS['__l10n']['Versions registered in table "version" of Dotclear'] = 'Versions enregistrées dans la table "version" de Dotclear';
|
||||
|
||||
#index.php:75
|
||||
$GLOBALS['__l10n']['There is no %s'] = 'Il n\'y a pas de %s';
|
||||
|
||||
#index.php:79
|
||||
$GLOBALS['__l10n']['There are %s %s'] = 'Il y a %s %s';
|
||||
|
||||
#index.php:82
|
||||
$GLOBALS['__l10n']['Objects'] = 'Objets';
|
||||
|
||||
#index.php:103
|
||||
$GLOBALS['__l10n']['Action on selected rows:'] = 'Action sur les lignes sélectionnées :';
|
||||
|
||||
#index.php:118
|
||||
#index.php:150
|
||||
$GLOBALS['__l10n']['Settings'] = 'Paramètres';
|
||||
|
||||
#index.php:118
|
||||
#index.php:277
|
||||
$GLOBALS['__l10n']['settings'] = 'paramètres';
|
||||
|
||||
#index.php:118
|
||||
$GLOBALS['__l10n']['setting'] = 'paramètre';
|
||||
|
||||
#index.php:120
|
||||
$GLOBALS['__l10n']['plugins'] = 'plugins';
|
||||
|
||||
#index.php:120
|
||||
$GLOBALS['__l10n']['plugin'] = 'plugin';
|
||||
|
||||
#index.php:121
|
||||
#index.php:153
|
||||
$GLOBALS['__l10n']['Themes'] = 'Thèmes';
|
||||
|
||||
#index.php:121
|
||||
$GLOBALS['__l10n']['themes'] = 'thèmes';
|
||||
|
||||
#index.php:121
|
||||
$GLOBALS['__l10n']['theme'] = 'thème';
|
||||
|
||||
#index.php:124
|
||||
$GLOBALS['__l10n']['delete table'] = 'effacer la table';
|
||||
|
||||
#index.php:125
|
||||
$GLOBALS['__l10n']['delete cache files'] = 'effacer les fichiers de cache';
|
||||
|
||||
#index.php:126
|
||||
$GLOBALS['__l10n']['delete plugin files'] = 'effacer les fichiers du plugin';
|
||||
|
||||
#index.php:127
|
||||
$GLOBALS['__l10n']['delete theme files'] = 'effacer les fichiers du thème';
|
||||
|
||||
#index.php:128
|
||||
$GLOBALS['__l10n']['delete the version number'] = 'effacer le n° de version';
|
||||
|
||||
#index.php:129
|
||||
$GLOBALS['__l10n']['Uninstall extensions'] = 'Désinstaller des plugins';
|
||||
|
||||
#index.php:130
|
||||
$GLOBALS['__l10n']['delete %s blog settings'] = 'effacer les paramètres de %s pour ce blog';
|
||||
|
||||
#index.php:131
|
||||
$GLOBALS['__l10n']['delete %s global settings'] = 'effacer les paramètres globaux de %s';
|
||||
|
||||
#index.php:132
|
||||
$GLOBALS['__l10n']['delete all %s settings'] = 'effacer tous les paramètres de %s';
|
||||
|
||||
#index.php:133
|
||||
$GLOBALS['__l10n']['delete %s table'] = 'effacer la table %s';
|
||||
|
||||
#index.php:134
|
||||
$GLOBALS['__l10n']['delete %s version number'] = 'effacer la version de %s';
|
||||
|
||||
#index.php:135
|
||||
$GLOBALS['__l10n']['delete %s plugin files'] = 'effacer les fichiers du plugin %s';
|
||||
|
||||
#index.php:136
|
||||
$GLOBALS['__l10n']['delete %s theme file'] = 'effacer les fichiers de thème de %s';
|
||||
|
||||
#index.php:137
|
||||
$GLOBALS['__l10n']['delete %s cache files'] = 'effacer le cache de %s';
|
||||
|
||||
#index.php:152
|
||||
$GLOBALS['__l10n']['Extensions'] = 'Plugins';
|
||||
|
||||
#index.php:217
|
||||
$GLOBALS['__l10n']['Beware: All actions done here are irreversible and are directly applied'] = 'Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées';
|
||||
|
||||
#index.php:221
|
||||
$GLOBALS['__l10n']['Action successfully done'] = 'Action effectuée avec succès';
|
||||
|
||||
#index.php:224
|
||||
$GLOBALS['__l10n']['Records and folders'] = 'Enregistrements et dossiers';
|
||||
|
||||
#index.php:241
|
||||
$GLOBALS['__l10n']['Default values of Dotclear are hidden. You can change this in settings tab'] = 'Les valeurs par défaut de Dotclear sont cachées. Vous pouvez changer cela dans l\'onglet des paramètres.';
|
||||
|
||||
#index.php:249
|
||||
#index.php:250
|
||||
$GLOBALS['__l10n']['This plugin settings'] = 'Paramètres de ce plugin';
|
||||
|
||||
#index.php:255
|
||||
$GLOBALS['__l10n']['Activate behaviors'] = 'Activer les behaviors';
|
||||
|
||||
#index.php:256
|
||||
$GLOBALS['__l10n']['Enable actions set in _uninstall.php files.'] = 'Lit les actions demandées dans les fichiers _uninstall.php.';
|
||||
|
||||
#index.php:260
|
||||
$GLOBALS['__l10n']['Hide Dotclear default properties in actions tabs'] = 'Cacher les propriétés par défaut dans les onglets d\'action';
|
||||
|
||||
#index.php:262
|
||||
$GLOBALS['__l10n']['Prevent from deleting Dotclear important properties.'] = 'Évite de supprimer des propriétés importantes de Dotclear.';
|
||||
|
||||
$GLOBALS['__l10n']['Make a huge cleaning of dotclear'] = 'Faites un énorme nettoyage de dotclear';
|
||||
|
||||
?>
|
|
@ -0,0 +1,261 @@
|
|||
# Language: Français
|
||||
# Module: dcAdvancedCleaner - 0.6.1
|
||||
# Date: 2018-01-24 16:01:10
|
||||
# Translated with translater 2017.05.10
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: dcAdvancedCleaner 0.6.1\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2018-01-24T16:01:10+00:00\n"
|
||||
"Last-Translator: brol\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: _admin.php:16
|
||||
#: _admin.php:28
|
||||
#: index.php:17
|
||||
msgid "Advanced cleaner"
|
||||
msgstr "Nettoyeur avancé"
|
||||
|
||||
#: inc/class.dc.advanced.cleaner.php:297
|
||||
msgid "Cannot execute \"%s\" of type \"%s\""
|
||||
msgstr "Impossible d'exécuter \"%s\" de type \"%s\""
|
||||
|
||||
#: inc/class.dc.uninstaller.php:292
|
||||
msgid "extra action"
|
||||
msgstr "Action additionnelle"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.activityreport.php:16
|
||||
msgid "Plugin dcAdvancedCleaner"
|
||||
msgstr "Plugin dcAdvancedCleaner"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.activityreport.php:24
|
||||
msgid "New action from dcAdvancedCleaner has been made with type=\"%s\", action=\"%s\", ns=\"%s\"."
|
||||
msgstr "Une nouvelle action depuis dcAdvancedCleaner a été effectuée avec : type=\"%s\", action=\"%s\", ns=\"%s\""
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:79
|
||||
msgid "Advanced uninstall"
|
||||
msgstr "Désinstallation avancée"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:136
|
||||
msgid "There is no module with uninstall features"
|
||||
msgstr "Il n'y a pas de module avec des fonctions de désinstallation avancée"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:141
|
||||
msgid "List of modules with advanced uninstall features"
|
||||
msgstr "Liste des modules avec des fonctions de désinstallation avancée"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:144
|
||||
msgid "id"
|
||||
msgstr "id"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:145
|
||||
msgid "n°"
|
||||
msgstr "n°"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:152
|
||||
msgid "extra"
|
||||
msgstr "extra"
|
||||
|
||||
#: inc/lib.dc.advanced.cleaner.behaviors.php:219
|
||||
msgid "Perform selected actions"
|
||||
msgstr "Effectuer les actions sélectionnées"
|
||||
|
||||
#: index.php:32
|
||||
msgid "delete global settings"
|
||||
msgstr "effacer les paramètres globaux"
|
||||
|
||||
#: index.php:33
|
||||
msgid "delete blog settings"
|
||||
msgstr "effacer les paramètres du blog"
|
||||
|
||||
#: index.php:34
|
||||
msgid "delete all settings"
|
||||
msgstr "effacer tous les paramètres"
|
||||
|
||||
#: index.php:38
|
||||
#: index.php:42
|
||||
#: index.php:46
|
||||
#: index.php:50
|
||||
msgid "empty"
|
||||
msgstr "vider"
|
||||
|
||||
#: index.php:57
|
||||
msgid "Namespaces registered in dcSettings"
|
||||
msgstr "Espaces de nom (namespaces) enregistrés dans dcSettings"
|
||||
|
||||
#: index.php:58
|
||||
msgid "All database tables of Dotclear"
|
||||
msgstr "Toutes les tables Dotclear de la base de données"
|
||||
|
||||
#: index.php:59
|
||||
msgid "Folders from plugins directories"
|
||||
msgstr "Dossiers des répertoires des plugins"
|
||||
|
||||
#: index.php:60
|
||||
msgid "Folders from blog themes directory"
|
||||
msgstr "Dossiers du répertoire des thèmes du blog"
|
||||
|
||||
#: index.php:61
|
||||
msgid "Folders from cache directory"
|
||||
msgstr "Dossiers du répertoire de cache"
|
||||
|
||||
#: index.php:62
|
||||
msgid "Versions registered in table \"version\" of Dotclear"
|
||||
msgstr "Versions enregistrées dans la table \"version\" de Dotclear"
|
||||
|
||||
#: index.php:75
|
||||
msgid "There is no %s"
|
||||
msgstr "Il n'y a pas de %s"
|
||||
|
||||
#: index.php:79
|
||||
msgid "There are %s %s"
|
||||
msgstr "Il y a %s %s"
|
||||
|
||||
#: index.php:82
|
||||
msgid "Objects"
|
||||
msgstr "Objets"
|
||||
|
||||
#: index.php:103
|
||||
msgid "Action on selected rows:"
|
||||
msgstr "Action sur les lignes sélectionnées :"
|
||||
|
||||
#: index.php:118
|
||||
#: index.php:150
|
||||
msgid "Settings"
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: index.php:118
|
||||
#: index.php:277
|
||||
msgid "settings"
|
||||
msgstr "paramètres"
|
||||
|
||||
#: index.php:118
|
||||
msgid "setting"
|
||||
msgstr "paramètre"
|
||||
|
||||
#: index.php:120
|
||||
msgid "plugins"
|
||||
msgstr "plugins"
|
||||
|
||||
#: index.php:120
|
||||
msgid "plugin"
|
||||
msgstr "plugin"
|
||||
|
||||
#: index.php:121
|
||||
#: index.php:153
|
||||
msgid "Themes"
|
||||
msgstr "Thèmes"
|
||||
|
||||
#: index.php:121
|
||||
msgid "themes"
|
||||
msgstr "thèmes"
|
||||
|
||||
#: index.php:121
|
||||
msgid "theme"
|
||||
msgstr "thème"
|
||||
|
||||
#: index.php:124
|
||||
msgid "delete table"
|
||||
msgstr "effacer la table"
|
||||
|
||||
#: index.php:125
|
||||
msgid "delete cache files"
|
||||
msgstr "effacer les fichiers de cache"
|
||||
|
||||
#: index.php:126
|
||||
msgid "delete plugin files"
|
||||
msgstr "effacer les fichiers du plugin"
|
||||
|
||||
#: index.php:127
|
||||
msgid "delete theme files"
|
||||
msgstr "effacer les fichiers du thème"
|
||||
|
||||
#: index.php:128
|
||||
msgid "delete the version number"
|
||||
msgstr "effacer le n° de version"
|
||||
|
||||
#: index.php:129
|
||||
msgid "Uninstall extensions"
|
||||
msgstr "Désinstaller des plugins"
|
||||
|
||||
#: index.php:130
|
||||
msgid "delete %s blog settings"
|
||||
msgstr "effacer les paramètres de %s pour ce blog"
|
||||
|
||||
#: index.php:131
|
||||
msgid "delete %s global settings"
|
||||
msgstr "effacer les paramètres globaux de %s"
|
||||
|
||||
#: index.php:132
|
||||
msgid "delete all %s settings"
|
||||
msgstr "effacer tous les paramètres de %s"
|
||||
|
||||
#: index.php:133
|
||||
msgid "delete %s table"
|
||||
msgstr "effacer la table %s"
|
||||
|
||||
#: index.php:134
|
||||
msgid "delete %s version number"
|
||||
msgstr "effacer la version de %s"
|
||||
|
||||
#: index.php:135
|
||||
msgid "delete %s plugin files"
|
||||
msgstr "effacer les fichiers du plugin %s"
|
||||
|
||||
#: index.php:136
|
||||
msgid "delete %s theme file"
|
||||
msgstr "effacer les fichiers de thème de %s"
|
||||
|
||||
#: index.php:137
|
||||
msgid "delete %s cache files"
|
||||
msgstr "effacer le cache de %s"
|
||||
|
||||
#: index.php:152
|
||||
msgid "Extensions"
|
||||
msgstr "Plugins"
|
||||
|
||||
#: index.php:217
|
||||
msgid "Beware: All actions done here are irreversible and are directly applied"
|
||||
msgstr "Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées"
|
||||
|
||||
#: index.php:221
|
||||
msgid "Action successfully done"
|
||||
msgstr "Action effectuée avec succès"
|
||||
|
||||
#: index.php:224
|
||||
msgid "Records and folders"
|
||||
msgstr "Enregistrements et dossiers"
|
||||
|
||||
#: index.php:241
|
||||
msgid "Default values of Dotclear are hidden. You can change this in settings tab"
|
||||
msgstr "Les valeurs par défaut de Dotclear sont cachées. Vous pouvez changer cela dans l'onglet des paramètres."
|
||||
|
||||
#: index.php:249
|
||||
#: index.php:250
|
||||
msgid "This plugin settings"
|
||||
msgstr "Paramètres de ce plugin"
|
||||
|
||||
#: index.php:255
|
||||
msgid "Activate behaviors"
|
||||
msgstr "Activer les behaviors"
|
||||
|
||||
#: index.php:256
|
||||
msgid "Enable actions set in _uninstall.php files."
|
||||
msgstr "Lit les actions demandées dans les fichiers _uninstall.php."
|
||||
|
||||
#: index.php:260
|
||||
msgid "Hide Dotclear default properties in actions tabs"
|
||||
msgstr "Cacher les propriétés par défaut dans les onglets d'action"
|
||||
|
||||
#: index.php:262
|
||||
msgid "Prevent from deleting Dotclear important properties."
|
||||
msgstr "Évite de supprimer des propriétés importantes de Dotclear."
|
||||
|
||||
msgid "Make a huge cleaning of dotclear"
|
||||
msgstr "Faites un énorme nettoyage de dotclear"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
# This file is part of dcAdvancedCleaner, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009 JC Denis and contributors
|
||||
# jcdenis@gdwd.com
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
if (!defined('DC_RC_PATH')){return;}
|
||||
if (!isset($__resources['help']['dcAdvancedCleaner']))
|
||||
{
|
||||
$__resources['help']['dcAdvancedCleaner'] = dirname(__FILE__).'/help/dcAdvancedCleaner.html';
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
x.x xxxxxxxx
|
||||
- orphan media cleaner
|
||||
- ajouter dossier /var dans la liste des caches
|
||||
|
||||
0.7.2 20180213 - Pierre Van Glabeke
|
||||
* réintégration modifs v0.5.1
|
||||
|
||||
0.7.1 20180127 - Pierre Van Glabeke
|
||||
* identification resources dc
|
||||
* modif css admin
|
||||
|
||||
0.7 20180126 - Pierre Van Glabeke
|
||||
* mise à jour des ressources de dc (plugins, thèmes, versions, settings, tables)
|
||||
* modif css admin
|
||||
* dc2.9 requis
|
||||
|
||||
0.6.1 20180124 - Pierre Van Glabeke
|
||||
* modif localisation
|
||||
|
||||
0.6 20180123 - Pierre Van Glabeke
|
||||
* ajout favori, modif icône
|
||||
* cosmétique dc2.6
|
||||
* modifs localisation
|
||||
|
||||
0.5.1 20101112
|
||||
* Fixed install on nightly build
|
||||
|
||||
0.5 20100606
|
||||
* Switched to DC 2.2
|
||||
* Fixed bug in tabs
|
||||
|
||||
0.4 20100416
|
||||
* Fixed list of tables (closes #440)
|
||||
* Fixed direct uninstaller
|
||||
* Added readable errors return
|
||||
* Added DC 2.2 compatibility (new settings)
|
||||
* Changed admin design
|
||||
|
||||
0.3 20091212
|
||||
* Fixed localized strings
|
||||
* Prepared DC 2.2 break
|
||||
* Added versioning
|
||||
* Added support for plugin activityReport
|
||||
|
||||
0.2 20091010
|
||||
* Fixed ''delete_all'' settings
|
||||
* Fixed typo
|
||||
* Added license
|
||||
|
||||
0.1 20090828
|
||||
* First public release
|
|
@ -0,0 +1,10 @@
|
|||
.listDcAdvancedCleaner {
|
||||
padding:10px;
|
||||
margin:10px 10px 0 0;
|
||||
}
|
||||
.bombDcAdvancedCleaner {
|
||||
padding:14px 0 2px 36px;
|
||||
background:url(index.php?pf=dcAdvancedCleaner/icon-b.png) no-repeat;
|
||||
}
|
||||
.offline {background: url("index.php?pf=info/images/icons/dotclear.png") no-repeat scroll 18em 7px;}
|
||||
.offline label{font-weight:bold;color:#c44d58;}
|
Loading…
Reference in New Issue