X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=gnot%2Fgnot.php;h=ca32d6d5e6134ef932ee2d713e13a1d2b4ca1b4d;hb=3157c99ea7c281286ddbf711f4bc1ef62de25ca4;hp=f24db4a1b317f552fea689ad8fd386756ccdfc53;hpb=2c69a9c3597c7363b5ebf3010f276e0225dff35c;p=friendica-addons.git diff --git a/gnot/gnot.php b/gnot/gnot.php index f24db4a1..ca32d6d5 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -7,11 +7,12 @@ * * */ + use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Model\Notify\Type; +use Friendica\Model\Notification; function gnot_install() { @@ -22,19 +23,6 @@ function gnot_install() { Logger::log("installed gnot"); } - -function gnot_uninstall() { - - Hook::unregister('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings'); - Hook::unregister('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); - Hook::unregister('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); - - - Logger::log("removed gnot"); -} - - - /** * * Callback from the settings post function. @@ -92,6 +80,6 @@ function gnot_settings(&$a,&$s) { function gnot_enotify_mail(&$a,&$b) { if((! $b['uid']) || (! intval(DI::pConfig()->get($b['uid'], 'gnot','enable')))) return; - if($b['type'] == Type::COMMENT) + if($b['type'] == Notification\Type::COMMENT) $b['subject'] = DI::l10n()->t('[Friendica:Notify] Comment to conversation #%d', $b['parent']); }