mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-04-23 06:20:10 +00: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
|
@ -36,7 +36,7 @@ function discourse_install()
|
|||
Hook::register('connector_settings_post', __FILE__, 'discourse_settings_post');
|
||||
}
|
||||
|
||||
function discourse_settings(App $a, array &$data)
|
||||
function discourse_settings(array &$data)
|
||||
{
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
return;
|
||||
|
@ -58,7 +58,7 @@ function discourse_settings(App $a, array &$data)
|
|||
];
|
||||
}
|
||||
|
||||
function discourse_settings_post(App $a)
|
||||
function discourse_settings_post()
|
||||
{
|
||||
if (!DI::userSession()->getLocalUserId() || empty($_POST['discourse-submit'])) {
|
||||
return;
|
||||
|
@ -67,7 +67,7 @@ function discourse_settings_post(App $a)
|
|||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'discourse', 'enabled', intval($_POST['enabled']));
|
||||
}
|
||||
|
||||
function discourse_email_getmessage(App $a, &$message)
|
||||
function discourse_email_getmessage(&$message)
|
||||
{
|
||||
if (empty($message['item']['uid'])) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue