X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=15f2b41e63e55bf9ff70c3bbfcb7423cf3e9c883;hb=5e800b012b7549fb502cd41b02e4aa7c572353b6;hp=b3ae2ed9a948549f40c8aff81adca78842b69806;hpb=36120615dd049c94b9db7858aae77d8ec9d28e84;p=friendica-addons.git diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index b3ae2ed9..15f2b41e 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -10,11 +10,10 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Logger; -use Friendica\Core\PConfig; +use Friendica\DI; +use Friendica\Model\Tag; use Friendica\Util\DateTimeFormat; -use Friendica\Util\Network; use Friendica\Util\XML; function ijpost_install() @@ -26,27 +25,21 @@ function ijpost_install() Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); } -function ijpost_uninstall() -{ - Hook::unregister('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); - Hook::unregister('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); - Hook::unregister('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets'); - Hook::unregister('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings'); - Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); -} - -function ijpost_jot_nets(&$a, &$b) +function ijpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields) { if (!local_user()) { return; } - $ij_post = PConfig::get(local_user(), 'ijpost', 'post'); - if (intval($ij_post) == 1) { - $ij_defpost = PConfig::get(local_user(), 'ijpost', 'post_by_default'); - $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '