mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Add ability to customize robot user agents
This commit is contained in:
parent
72651ed095
commit
82213ce11a
5 changed files with 28 additions and 0 deletions
|
|
@ -652,6 +652,13 @@ class adminAdminController extends admin
|
|||
natcasesort($classes);
|
||||
Rhymix\Framework\Config::set('mediafilter.classes', array_values($classes));
|
||||
|
||||
// Robot user agents
|
||||
$robot_user_agents = $vars->robot_user_agents;
|
||||
$robot_user_agents = array_filter(array_map('trim', preg_split('/[\r\n]/', $robot_user_agents)), function($item) {
|
||||
return $item !== '';
|
||||
});
|
||||
Rhymix\Framework\Config::set('security.robot_user_agents', array_values($robot_user_agents));
|
||||
|
||||
// Remove old embed filter
|
||||
$config = Rhymix\Framework\Config::getAll();
|
||||
unset($config['embedfilter']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue