X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=superblock%2Fsuperblock.php;h=e0b3ff83e9f859803e5e173aca6053c25492d9ee;hb=b46a23eab3c37a50b109406167493a3a2414ab25;hp=6b7dae22e6625f0a46982d77a30e4ce426bddabe;hpb=febc835a2d90509a54a41dca07dba1d8e3ed6d07;p=friendica-addons.git
diff --git a/superblock/superblock.php b/superblock/superblock.php
index 6b7dae22..e0b3ff83 100644
--- a/superblock/superblock.php
+++ b/superblock/superblock.php
@@ -7,8 +7,6 @@
*
*/
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
use Friendica\DI;
use Friendica\Util\Strings;
@@ -46,18 +44,18 @@ function superblock_addon_settings(&$a, &$s)
}
$s .= '';
- $s .= '' . L10n::t('Superblock') . '
';
+ $s .= '' . DI::l10n()->t('Superblock') . '
';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '' . L10n::t('Superblock') . '
';
+ $s .= '' . DI::l10n()->t('Superblock') . '
';
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
- $s .= '
';
+ $s .= '';
return;
}
@@ -70,7 +68,7 @@ function superblock_addon_settings_post(&$a, &$b)
if (!empty($_POST['superblock-submit'])) {
DI::pConfig()->set(local_user(), 'system', 'blocked',trim($_POST['superblock-words']));
- info(L10n::t('SUPERBLOCK Settings saved.') . EOL);
+ info(DI::l10n()->t('SUPERBLOCK Settings saved.') . EOL);
}
}
@@ -97,7 +95,8 @@ function superblock_enotify_store(&$a,&$b) {
}
}
if ($found) {
- $b['abort'] = true;
+ // Empty out the fields
+ $b = [];
}
}
@@ -143,7 +142,7 @@ function superblock_item_photo_menu(&$a, &$b)
}
}
- $b['menu'][L10n::t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
+ $b['menu'][DI::l10n()->t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
}
function superblock_module() {}
@@ -164,6 +163,6 @@ function superblock_init(&$a)
}
DI::pConfig()->set(local_user(), 'system', 'blocked', $words);
- info(L10n::t('superblock settings updated') . EOL );
+ info(DI::l10n()->t('superblock settings updated') . EOL );
exit();
}