mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Initial implementation of blacklist function
This commit is contained in:
parent
055fd49e40
commit
e335aa477e
2 changed files with 36 additions and 0 deletions
|
|
@ -157,6 +157,11 @@ class Context
|
||||||
*/
|
*/
|
||||||
public $isSuccessInit = TRUE;
|
public $isSuccessInit = TRUE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin blacklist cache
|
||||||
|
*/
|
||||||
|
private static $_blacklist = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Singleton instance
|
* Singleton instance
|
||||||
* @var object
|
* @var object
|
||||||
|
|
@ -2566,6 +2571,26 @@ class Context
|
||||||
return self::$_instance->allow_rewrite;
|
return self::$_instance->allow_rewrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether an addon, module, or widget is blacklisted
|
||||||
|
*
|
||||||
|
* @param string $plugin_name
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function isBlacklistedPlugin($plugin_name)
|
||||||
|
{
|
||||||
|
if (self::$_blacklist === null)
|
||||||
|
{
|
||||||
|
self::$_blacklist = (include RX_BASEDIR . 'common/defaults/blacklist.php');
|
||||||
|
if (!is_array(self::$_blacklist))
|
||||||
|
{
|
||||||
|
self::$_blacklist = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isset(self::$_blacklist[$plugin_name]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a local path into an URL
|
* Converts a local path into an URL
|
||||||
*
|
*
|
||||||
|
|
|
||||||
11
common/defaults/blacklist.php
Normal file
11
common/defaults/blacklist.php
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rhymix Default Blacklist for Deprecated Plugins
|
||||||
|
*
|
||||||
|
* Copyright (c) Rhymix Developers and Contributors
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'member_communication' => true,
|
||||||
|
'zipperupper' => true,
|
||||||
|
);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue