mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
[various] Remove App dependency from hook functions
This commit is contained in:
parent
b53914ee11
commit
39c654da00
87 changed files with 419 additions and 451 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue