<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
class Group extends BaseModule
{
- public function post()
+ protected function post(array $request = [])
{
if (DI::mode()->isAjax()) {
$this->ajaxPost();
if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'new')) {
BaseModule::checkFormSecurityTokenRedirectOnError('/group/new', 'group_edit');
- $name = trim($_POST['groupname']);
+ $name = trim($request['groupname']);
$r = Model\Group::create(local_user(), $name);
if ($r) {
$r = Model\Group::getIdByName(local_user(), $name);
}
}
- public function content(): string
+ protected function content(array $request = []): string
{
$change = false;
if ($change) {
$tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
echo Renderer::replaceMacros($tpl, $context);
- exit();
+ System::exit();
}
return Renderer::replaceMacros($tpl, $context);