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'
|
'default', 'customCSS', 'blueSilence', 'berlin', 'ductile'
|
||||||
],
|
],
|
||||||
'caches' => [
|
'caches' => [
|
||||||
'cbfeed', 'dcrepo', 'versions'
|
'cbfeed', 'cbtpl', 'dcrepo', 'versions'
|
||||||
],
|
],
|
||||||
'versions' => [
|
'versions' => [
|
||||||
'antispam', 'blogroll', 'blowupConfig', 'core', 'dcCKEditor', 'dcLegacyEditor', 'pages', 'pings', 'simpleMenu', 'tags', 'widgets'
|
'antispam', 'blogroll', 'blowupConfig', 'core', 'dcCKEditor', 'dcLegacyEditor', 'pages', 'pings', 'simpleMenu', 'tags', 'widgets'
|
||||||
@ -74,6 +74,21 @@ class dcAdvancedCleaner
|
|||||||
'.', '..', '__MACOSX', '.svn', 'CVS', '.DS_Store', 'Thumbs.db'
|
'.', '..', '__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)
|
public static function getSettings($core)
|
||||||
{
|
{
|
||||||
$res = $core->con->select(
|
$res = $core->con->select(
|
||||||
|
@ -87,8 +87,9 @@ function drawDcAdvancedCleanerLists($core, $type)
|
|||||||
'<th>' . __('Name') . '</th><th>' . __('Objects') . '</th>' .
|
'<th>' . __('Name') . '</th><th>' . __('Objects') . '</th>' .
|
||||||
'</tr></thead><tbody>';
|
'</tr></thead><tbody>';
|
||||||
|
|
||||||
|
$official = dcAdvancedCleaner::getOfficial($type);
|
||||||
foreach($rs as $k => $v) {
|
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) {
|
if ($core->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_dcproperty_hide && $offline) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user