X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=group_text%2Fgroup_text.php;h=06b3f6151d79e3b74de024650bafddbded4248d6;hb=d2639edbc210fed7ed8f29609597ff133e716212;hp=6d14b6f5f851138e2851275bbc8b801a0230f4a3;hpb=44636c146148da6fca72f6039d98438581ae0049;p=friendica-addons.git diff --git a/group_text/group_text.php b/group_text/group_text.php index 6d14b6f5..06b3f615 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -6,9 +6,7 @@ * Author: Thomas Willingham */ use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Logger; -use Friendica\Core\PConfig; use Friendica\DI; function group_text_install() { @@ -43,9 +41,7 @@ function group_text_uninstall() { function group_text_settings_post($a,$post) { if(! local_user() || empty($_POST['group_text-submit'])) return; - PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text'])); - - info(L10n::t('Group Text settings updated.') . EOL); + DI::pConfig()->set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text'])); } @@ -65,24 +61,24 @@ function group_text_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + DI::page()['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ - $enabled = PConfig::get(local_user(),'system','groupedit_image_limit'); + $enabled = DI::pConfig()->get(local_user(),'system','groupedit_image_limit'); $checked = (($enabled) ? ' checked="checked" ' : ''); /* Add some HTML to the existing form */ $s .= '
'; - $s .= '

' . L10n::t('Group Text') . '

'; + $s .= '

' . DI::l10n()->t('Group Text') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; }