mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Add authoritative list of default plugins #1967
This commit is contained in:
parent
16ecfa408e
commit
e33a071f3e
2 changed files with 96 additions and 1 deletions
|
|
@ -141,8 +141,9 @@ class Context
|
||||||
private static $_oFrontEndFileHandler = null;
|
private static $_oFrontEndFileHandler = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin blacklist cache
|
* Plugin default and blacklist cache
|
||||||
*/
|
*/
|
||||||
|
private static $_default_plugins = null;
|
||||||
private static $_blacklist = null;
|
private static $_blacklist = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2590,6 +2591,27 @@ class Context
|
||||||
return Rhymix\Framework\Router::getRewriteLevel();
|
return Rhymix\Framework\Router::getRewriteLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether an addon, layout, module, or widget is distributed with Rhymix core.
|
||||||
|
*
|
||||||
|
* @param string $plugin_name
|
||||||
|
* @param string $type
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function isDefaultPlugin($plugin_name, $type)
|
||||||
|
{
|
||||||
|
if (self::$_default_plugins === null)
|
||||||
|
{
|
||||||
|
self::$_default_plugins = (include RX_BASEDIR . 'common/defaults/plugins.php');
|
||||||
|
if (!is_array(self::$_default_plugins))
|
||||||
|
{
|
||||||
|
self::$_default_plugins = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isset(self::$_default_plugins[$type][$plugin_name]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether an addon, module, or widget is blacklisted
|
* Check whether an addon, module, or widget is blacklisted
|
||||||
*
|
*
|
||||||
|
|
|
||||||
73
common/defaults/plugins.php
Normal file
73
common/defaults/plugins.php
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rhymix Default Plugins
|
||||||
|
*
|
||||||
|
* Copyright (c) Rhymix Developers and Contributors
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
|
||||||
|
// Addons
|
||||||
|
'addon' => array(
|
||||||
|
'adminlogging' => true,
|
||||||
|
'autolink' => true,
|
||||||
|
'counter' => true,
|
||||||
|
'member_extra_info' => true,
|
||||||
|
'photoswipe' => true,
|
||||||
|
'point_level_icon' => true,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Layouts
|
||||||
|
'layout' => array(
|
||||||
|
'colorCode' => true,
|
||||||
|
'default' => true,
|
||||||
|
'simpleGray' => true,
|
||||||
|
'user_layout' => true,
|
||||||
|
'xedition' => true,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Modules
|
||||||
|
'module' => array(
|
||||||
|
'addon' => true,
|
||||||
|
'admin' => true,
|
||||||
|
'adminlogging' => true,
|
||||||
|
'advanced_mailer' => true,
|
||||||
|
'autoinstall' => true,
|
||||||
|
'board' => true,
|
||||||
|
'comment' => true,
|
||||||
|
'communication' => true,
|
||||||
|
'counter' => true,
|
||||||
|
'document' => true,
|
||||||
|
'editor' => true,
|
||||||
|
'file' => true,
|
||||||
|
'importer' => true,
|
||||||
|
'install' => true,
|
||||||
|
'integration_search' => true,
|
||||||
|
'krzip' => true,
|
||||||
|
'layout' => true,
|
||||||
|
'member' => true,
|
||||||
|
'menu' => true,
|
||||||
|
'message' => true,
|
||||||
|
'module' => true,
|
||||||
|
'ncenterlite' => true,
|
||||||
|
'page' => true,
|
||||||
|
'point' => true,
|
||||||
|
'poll' => true,
|
||||||
|
'rss' => true,
|
||||||
|
'session' => true,
|
||||||
|
'spamfilter' => true,
|
||||||
|
'tag' => true,
|
||||||
|
'trash' => true,
|
||||||
|
'widget' => true,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Widgets
|
||||||
|
'widget' => array(
|
||||||
|
'content' => true,
|
||||||
|
'counter_status' => true,
|
||||||
|
'language_select' => true,
|
||||||
|
'login_info' => true,
|
||||||
|
'mcontent' => true,
|
||||||
|
'pollWidget' => true,
|
||||||
|
),
|
||||||
|
);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue