Replace deprecated Addon::*registerHook by Hook::*register

This commit is contained in:
Hypolite Petovan 2018-12-26 02:28:16 -05:00
parent eaeb834819
commit c27b1cb66f
82 changed files with 625 additions and 630 deletions

View file

@ -6,7 +6,7 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Util\Network;
// IMPORTANT: SET THIS to your fortunate server
@ -15,7 +15,7 @@ define('FORTUNATE_SERVER', 'hostname.com');
function fortunate_install()
{
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::register('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
notice('Fortunate addon requires configuration. See README');
}
@ -23,7 +23,7 @@ function fortunate_install()
function fortunate_uninstall()
{
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::unregister('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
}