mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 13:22:16 +09:00
Update all other places to use new MediaFilter class
This commit is contained in:
parent
7ecd9230c2
commit
2effbea06f
6 changed files with 29 additions and 25 deletions
|
|
@ -216,14 +216,14 @@ class ConfigParser
|
|||
}
|
||||
$config['lock']['allow'] = array_values($db_info->sitelock_whitelist);
|
||||
|
||||
// Convert embed filter configuration.
|
||||
// Convert media filter configuration.
|
||||
if (is_array($db_info->embed_white_iframe))
|
||||
{
|
||||
$whitelist = array_unique(array_map(function($item) {
|
||||
return preg_match('@^https?://(.*)$@i', $item, $matches) ? $matches[1] : $item;
|
||||
}, $db_info->embed_white_iframe));
|
||||
natcasesort($whitelist);
|
||||
$config['embedfilter']['iframe'] = $whitelist;
|
||||
$config['mediafilter']['iframe'] = $whitelist;
|
||||
}
|
||||
if (is_array($db_info->embed_white_object))
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ class ConfigParser
|
|||
return preg_match('@^https?://(.*)$@i', $item, $matches) ? $matches[1] : $item;
|
||||
}, $db_info->embed_white_object));
|
||||
natcasesort($whitelist);
|
||||
$config['embedfilter']['object'] = $whitelist;
|
||||
$config['mediafilter']['object'] = $whitelist;
|
||||
}
|
||||
|
||||
// Convert miscellaneous configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue