provide plugin hooks for blacklist checking functions.

This commit is contained in:
redmatrix
2015-12-06 20:45:21 -08:00
parent 2d799f2c11
commit f7f0d2b265
4 changed files with 40 additions and 0 deletions

View File

@@ -1822,6 +1822,13 @@ function check_siteallowed($url) {
$retvalue = true;
$arr = array('url' => $url);
call_hooks('check_siteallowed',$arr);
if(array_key_exists('allowed',$arr))
return $arr['allowed'];
$bl1 = get_config('system','whitelisted_sites');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {
@@ -1848,6 +1855,12 @@ function check_channelallowed($hash) {
$retvalue = true;
$arr = array('hash' => $hash);
call_hooks('check_channelallowed',$arr);
if(array_key_exists('allowed',$arr))
return $arr['allowed'];
$bl1 = get_config('system','whitelisted_channels');
if(is_array($bl1) && $bl1) {
foreach($bl1 as $bl) {