X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=blockem%2Fblockem.php;h=2a2cd3d265b1a47d373fa09bef617ede73077701;hb=0afd633346b517894ff8e92c705bd5d052dd06a2;hp=d8855886c0c751ccd203b6a4c565ecc4205428e1;hpb=f8d9efe8c7e57976acae3b1416220a7947ff94fc;p=friendica-addons.git diff --git a/blockem/blockem.php b/blockem/blockem.php index d8855886..2a2cd3d2 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -1,35 +1,33 @@ - * + * */ - +use Friendica\Core\Addon; use Friendica\Core\PConfig; function blockem_install() { - register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); - register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); - register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); - register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); - register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); - register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); - register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); + Addon::registerHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); + Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); + Addon::registerHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); + Addon::registerHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); + Addon::registerHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); + Addon::registerHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); + Addon::registerHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); } function blockem_uninstall() { - unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); - unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); - unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); - unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); - unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); - unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); - unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); + Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); + Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); + Addon::unregisterHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); + Addon::unregisterHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); + Addon::unregisterHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); + Addon::unregisterHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); + Addon::unregisterHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' ); } @@ -141,7 +139,7 @@ function blockem_prepare_body(&$a,&$b) { } if($found) { $rnd = random_string(8); - $b['html'] = ''; + $b['html'] = ''; } } @@ -218,7 +216,7 @@ function blockem_init(&$a) { } if(array_key_exists('unblock',$_GET) && $_GET['unblock']) { $arr = explode(',',$words); - $newarr = array(); + $newarr = []; if(count($arr)) { foreach($arr as $x) {