X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=gnot%2Fgnot.php;h=686b1f65d3c204aad38a5cf6079043eb5ab513b2;hb=c95713b19c35eff74052bf248bfc1025d5d9161b;hp=5aa0995b1aa34b3f8c4450f9e29b5b979224f727;hpb=ea3a9052d83f8ea99cee8438022be0b022a24cc1;p=friendica-addons.git diff --git a/gnot/gnot.php b/gnot/gnot.php index 5aa0995b..686b1f65 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -8,9 +8,7 @@ * */ use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Logger; -use Friendica\Core\PConfig; use Friendica\Core\Renderer; use Friendica\DI; @@ -49,8 +47,8 @@ function gnot_settings_post($a,$post) { if(! local_user() || empty($_POST['gnot-submit'])) return; - PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot'])); - info(L10n::t('Gnot settings updated.') . EOL); + DI::pConfig()->set(local_user(),'gnot','enable',intval($_POST['gnot'])); + info(DI::l10n()->t('Gnot settings updated.') . EOL); } @@ -82,11 +80,11 @@ function gnot_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= Renderer::replaceMacros($t, [ - '$title' => L10n::t('Gnot Settings') , - '$submit' => L10n::t('Save Settings'), - '$enable' => L10n::t('Enable this addon?'), + '$title' => DI::l10n()->t('Gnot Settings') , + '$submit' => DI::l10n()->t('Save Settings'), + '$enable' => DI::l10n()->t('Enable this addon?'), '$enabled' => $gnot_checked, - '$text' => L10n::t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") + '$text' => DI::l10n()->t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") ]); } @@ -95,5 +93,5 @@ function gnot_enotify_mail(&$a,&$b) { if((! $b['uid']) || (! intval(DI::pConfig()->get($b['uid'], 'gnot','enable')))) return; if($b['type'] == NOTIFY_COMMENT) - $b['subject'] = L10n::t('[Friendica:Notify] Comment to conversation #%d', $b['parent']); + $b['subject'] = DI::l10n()->t('[Friendica:Notify] Comment to conversation #%d', $b['parent']); }