diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 1d6982c55..b7b383399 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -2529,9 +2529,10 @@ class Context * Check whether an addon, module, or widget is blacklisted * * @param string $plugin_name + * @param string $type * @return bool */ - public static function isBlacklistedPlugin($plugin_name) + public static function isBlacklistedPlugin($plugin_name, $type = '') { if (self::$_blacklist === null) { @@ -2542,7 +2543,21 @@ class Context } } - return isset(self::$_blacklist[$plugin_name]); + if ($type) + { + return isset(self::$_blacklist[$type][$plugin_name]); + } + else + { + foreach (self::$_blacklist as $type => $blacklist) + { + if (isset(self::$_blacklist[$type][$plugin_name])) + { + return true; + } + } + return false; + } } /** diff --git a/common/defaults/blacklist.php b/common/defaults/blacklist.php index 6ef5bb80f..eb0241e39 100644 --- a/common/defaults/blacklist.php +++ b/common/defaults/blacklist.php @@ -6,20 +6,33 @@ * Copyright (c) Rhymix Developers and Contributors */ return array( - 'autolang' => true, - 'auto_login' => true, - 'errorlogger' => true, - 'fix_mysql_utf8' => true, - 'homepage' => true, - 'jquerycdn' => true, - 'member_communication' => true, - 'multidomain' => true, - 'seo' => true, - 'session_shield' => true, - 'smartphone' => true, - 'trackback' => true, - 'zipperupper' => true, - 'elkha_www' => true, - 'autowww' => true, - 'fix_domain' => true, + + // Addons + 'addon' => array( + 'autolang' => true, + 'autowww' => true, + 'elkha_www' => true, + 'fix_domain' => true, + 'fix_mysql_utf8' => true, + 'jquerycdn' => true, + 'member_communication' => true, + 'session_shield' => true, + 'smartphone' => true, + 'zipperupper' => true, + ), + + // Modules + 'module' => array( + 'auto_login' => true, + 'errorlogger' => true, + 'homepage' => true, + 'multidomain' => true, + 'seo' => true, + 'trackback' => true, + ), + + // Widgets + 'widget' => array( + + ), ); diff --git a/modules/addon/addon.admin.model.php b/modules/addon/addon.admin.model.php index c7b670cc4..f011d0581 100644 --- a/modules/addon/addon.admin.model.php +++ b/modules/addon/addon.admin.model.php @@ -47,7 +47,7 @@ class addonAdminModel extends addon foreach($addonList as $key => $addon) { // check blacklist - $addonList[$key]->isBlacklisted = Context::isBlacklistedPlugin($addon->addon); + $addonList[$key]->isBlacklisted = Context::isBlacklistedPlugin($addon->addon, 'addon'); // get easyinstall remove url $packageSrl = $oAutoinstallModel->getPackageSrlByPath($addon->path); diff --git a/modules/addon/addon.controller.php b/modules/addon/addon.controller.php index d9b242b82..82e17ad89 100644 --- a/modules/addon/addon.controller.php +++ b/modules/addon/addon.controller.php @@ -77,7 +77,7 @@ class addonController extends addon $addon_list = $oAddonModel->getInsertedAddons($site_srl, $gtype); foreach($addon_list as $addon => $val) { - if(Context::isBlacklistedPlugin($addon) + if(Context::isBlacklistedPlugin($addon, 'addon') || ($type == "pc" && $val->is_used != 'Y') || ($type == "mobile" && $val->is_used_m != 'Y') || ($gtype == 'global' && $val->is_fixed != 'Y') diff --git a/modules/addon/tpl/addon_list.html b/modules/addon/tpl/addon_list.html index 5075ce49e..4be9be55c 100644 --- a/modules/addon/tpl/addon_list.html +++ b/modules/addon/tpl/addon_list.html @@ -35,7 +35,7 @@

{$addon->title}

-

{$addon->description}

+

{$addon->description}

{$lang->msg_avail_easy_update} {$lang->msg_do_you_like_update}

diff --git a/modules/addon/tpl/setup_addon.html b/modules/addon/tpl/setup_addon.html index 5f5259f85..629f237a6 100644 --- a/modules/addon/tpl/setup_addon.html +++ b/modules/addon/tpl/setup_addon.html @@ -34,7 +34,7 @@ -
+

{$lang->msg_warning} {$lang->msg_blacklisted_module}
{$lang->get('admin.msg_blacklisted_reason.'.$addon_info->addon_name)}

diff --git a/modules/admin/tpl/layout.html b/modules/admin/tpl/layout.html index c25d76976..e784a5d53 100644 --- a/modules/admin/tpl/layout.html +++ b/modules/admin/tpl/layout.html @@ -2,7 +2,7 @@
-
+

{$lang->msg_warning} {$lang->msg_blacklisted_module}
{$lang->get('admin.msg_blacklisted_reason.'.$blacklisted_plugin_name)} diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 613cd08da..47998f42b 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -1481,7 +1481,7 @@ class moduleModel extends module $info->path = $path; $info->admin_index_act = $info->admin_index_act ?? null; - if(!Context::isBlacklistedPlugin($module_name)) + if(!Context::isBlacklistedPlugin($module_name, 'module')) { // Check if DB is installed if($table_count > $created_table_count) diff --git a/modules/module/tpl/module_list.html b/modules/module/tpl/module_list.html index 2e47fdf7e..08a8270d6 100644 --- a/modules/module/tpl/module_list.html +++ b/modules/module/tpl/module_list.html @@ -32,7 +32,7 @@ {$val->title}

{$val->description}

-

+

{$lang->msg_blacklisted_module}
{$lang->get('admin.msg_blacklisted_reason.'.$val->module)}

@@ -43,7 +43,7 @@ Rhymix Core - {$val->version} + {$val->version}