[various] Remove App dependency from hook functions
This commit is contained in:
@@ -24,7 +24,7 @@ function blockbot_install()
|
||||
Hook::register('init_1', __FILE__, 'blockbot_init_1');
|
||||
}
|
||||
|
||||
function blockbot_addon_admin(App $a, string &$o)
|
||||
function blockbot_addon_admin(string &$o)
|
||||
{
|
||||
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/blockbot/');
|
||||
|
||||
@@ -36,14 +36,14 @@ function blockbot_addon_admin(App $a, string &$o)
|
||||
]);
|
||||
}
|
||||
|
||||
function blockbot_addon_admin_post(App $a)
|
||||
function blockbot_addon_admin_post()
|
||||
{
|
||||
DI::config()->set('blockbot', 'good_crawlers', $_POST['good_crawlers'] ?? false);
|
||||
DI::config()->set('blockbot', 'block_gab', $_POST['block_gab'] ?? false);
|
||||
DI::config()->set('blockbot', 'training', $_POST['training'] ?? false);
|
||||
}
|
||||
|
||||
function blockbot_init_1(App $a)
|
||||
function blockbot_init_1()
|
||||
{
|
||||
if (empty($_SERVER['HTTP_USER_AGENT'])) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user