use of DC constant to be up to date with official plugins and themes
This commit is contained in:
parent
5529c40922
commit
6ce6b1fdbe
@ -63,7 +63,7 @@ class dcAdvancedCleaner
|
||||
'default', 'customCSS', 'blueSilence', 'berlin', 'ductile'
|
||||
],
|
||||
'caches' => [
|
||||
'cbfeed', 'dcrepo', 'versions'
|
||||
'cbfeed', 'cbtpl', 'dcrepo', 'versions'
|
||||
],
|
||||
'versions' => [
|
||||
'antispam', 'blogroll', 'blowupConfig', 'core', 'dcCKEditor', 'dcLegacyEditor', 'pages', 'pings', 'simpleMenu', 'tags', 'widgets'
|
||||
@ -74,6 +74,21 @@ class dcAdvancedCleaner
|
||||
'.', '..', '__MACOSX', '.svn', 'CVS', '.DS_Store', 'Thumbs.db'
|
||||
];
|
||||
|
||||
public static function getOfficial($type = '')
|
||||
{
|
||||
$official = array_merge(
|
||||
self::$dotclear,
|
||||
[
|
||||
'plugins' => explode(',', DC_DISTRIB_PLUGINS),
|
||||
'themes' => explode(',', DC_DISTRIB_THEMES)
|
||||
]
|
||||
);
|
||||
if (empty($type)) {
|
||||
return $official;
|
||||
}
|
||||
return array_key_exists($type, $official) ? $official[$type] : [];
|
||||
}
|
||||
|
||||
public static function getSettings($core)
|
||||
{
|
||||
$res = $core->con->select(
|
||||
@ -351,7 +366,7 @@ class dcAdvancedCleaner
|
||||
$files = files::scandir($path);
|
||||
|
||||
foreach($files AS $file) {
|
||||
if (in_array($file,$exclude)) {
|
||||
if (in_array($file, $exclude)) {
|
||||
continue;
|
||||
}
|
||||
if (is_dir($path . '/' . $file)) {
|
||||
|
@ -87,8 +87,9 @@ function drawDcAdvancedCleanerLists($core, $type)
|
||||
'<th>' . __('Name') . '</th><th>' . __('Objects') . '</th>' .
|
||||
'</tr></thead><tbody>';
|
||||
|
||||
$official = dcAdvancedCleaner::getOfficial($type);
|
||||
foreach($rs as $k => $v) {
|
||||
$offline = in_array($v['key'], dcAdvancedCleaner::$dotclear[$type]);
|
||||
$offline = in_array($v['key'], $official);
|
||||
|
||||
if ($core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_dcproperty_hide && $offline) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user