mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
Replace deprecated Addon::callHooks with Hook::callAll
- Update documentation
This commit is contained in:
parent
895b3abf32
commit
55e54bb950
58 changed files with 450 additions and 475 deletions
|
@ -10,7 +10,7 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\ACL;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
|
@ -194,7 +194,7 @@ class Contact extends BaseModule
|
|||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
Addon::callHooks('contact_edit_post', $_POST);
|
||||
Hook::callAll('contact_edit_post', $_POST);
|
||||
|
||||
$profile_id = intval(defaults($_POST, 'profile-assign', 0));
|
||||
if ($profile_id) {
|
||||
|
@ -659,7 +659,7 @@ class Contact extends BaseModule
|
|||
|
||||
$arr = ['contact' => $contact, 'output' => $o];
|
||||
|
||||
Addon::callHooks('contact_edit', $arr);
|
||||
Hook::callAll('contact_edit', $arr);
|
||||
|
||||
return $arr['output'];
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ namespace Friendica\Module;
|
|||
|
||||
use Exception;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Authentication;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
|
@ -131,7 +131,7 @@ class Login extends BaseModule
|
|||
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
|
||||
* and later addons should not interfere with an earlier one that succeeded.
|
||||
*/
|
||||
Addon::callHooks('authenticate', $addon_auth);
|
||||
Hook::callAll('authenticate', $addon_auth);
|
||||
|
||||
try {
|
||||
if ($addon_auth['authenticated']) {
|
||||
|
@ -340,7 +340,7 @@ class Login extends BaseModule
|
|||
]
|
||||
);
|
||||
|
||||
Addon::callHooks('login_hook', $o);
|
||||
Hook::callAll('login_hook', $o);
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
/**
|
||||
* @file src/Module/Logout.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Authentication;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
|
||||
/**
|
||||
* Logout module
|
||||
|
@ -22,7 +22,7 @@ class Logout extends BaseModule
|
|||
*/
|
||||
public static function init()
|
||||
{
|
||||
Addon::callHooks("logging_out");
|
||||
Hook::callAll("logging_out");
|
||||
Authentication::deleteSession();
|
||||
info(L10n::t('Logged out.') . EOL);
|
||||
self::getApp()->internalRedirect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue