2019-05-01 19:29:04 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2022-01-02 07:27:47 +00:00
|
|
|
* @copyright Copyright (C) 2010-2022, the Friendica project
|
2020-02-09 15:18:46 +00:00
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
2019-05-01 19:29:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
|
|
|
use Friendica\Core\Renderer;
|
|
|
|
use Friendica\Core\System;
|
|
|
|
use Friendica\Database\DBA;
|
2019-12-15 21:34:11 +00:00
|
|
|
use Friendica\DI;
|
2019-05-01 19:29:04 +00:00
|
|
|
use Friendica\Model;
|
|
|
|
|
|
|
|
require_once 'boot.php';
|
|
|
|
|
|
|
|
class Group extends BaseModule
|
|
|
|
{
|
2021-11-28 12:44:42 +00:00
|
|
|
protected function post(array $request = [])
|
2019-05-01 19:29:04 +00:00
|
|
|
{
|
2019-12-15 23:30:39 +00:00
|
|
|
if (DI::mode()->isAjax()) {
|
2021-11-26 14:48:05 +00:00
|
|
|
$this->ajaxPost();
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!local_user()) {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Permission denied.'));
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect();
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'new')) {
|
2019-05-01 19:29:04 +00:00
|
|
|
BaseModule::checkFormSecurityTokenRedirectOnError('/group/new', 'group_edit');
|
|
|
|
|
2021-11-28 12:44:42 +00:00
|
|
|
$name = trim($request['groupname']);
|
2019-05-01 19:29:04 +00:00
|
|
|
$r = Model\Group::create(local_user(), $name);
|
|
|
|
if ($r) {
|
|
|
|
$r = Model\Group::getIdByName(local_user(), $name);
|
|
|
|
if ($r) {
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('group/' . $r);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
} else {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Could not create group.'));
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('group');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() == 2) && intval(DI::args()->getArgv()[1])) {
|
2019-05-01 19:29:04 +00:00
|
|
|
BaseModule::checkFormSecurityTokenRedirectOnError('/group', 'group_edit');
|
|
|
|
|
2021-07-25 15:23:37 +00:00
|
|
|
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => local_user()]);
|
2019-05-01 19:29:04 +00:00
|
|
|
if (!DBA::isResult($group)) {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Group not found.'));
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('contact');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
2021-11-06 20:25:21 +00:00
|
|
|
$groupname = trim($_POST['groupname']);
|
2019-05-01 19:29:04 +00:00
|
|
|
if (strlen($groupname) && ($groupname != $group['name'])) {
|
2020-07-23 06:11:21 +00:00
|
|
|
if (!Model\Group::update($group['id'], $groupname)) {
|
|
|
|
notice(DI::l10n()->t('Group name was not changed.'));
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-26 14:48:05 +00:00
|
|
|
public function ajaxPost()
|
2019-05-01 19:29:04 +00:00
|
|
|
{
|
|
|
|
try {
|
|
|
|
if (!local_user()) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Permission denied.'), 403);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2021-11-26 14:48:05 +00:00
|
|
|
if (isset($this->parameters['command'])) {
|
|
|
|
$group_id = $this->parameters['group'];
|
|
|
|
$contact_id = $this->parameters['contact'];
|
2019-05-01 19:29:04 +00:00
|
|
|
|
|
|
|
if (!Model\Group::exists($group_id, local_user())) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Unknown group.'), 404);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2021-11-26 14:48:37 +00:00
|
|
|
// @TODO Backward compatibility with user contacts, remove by version 2022.03
|
|
|
|
$cdata = Model\Contact::getPublicAndUserContactID($contact_id, local_user());
|
|
|
|
if (empty($cdata['public'])) {
|
|
|
|
throw new \Exception(DI::l10n()->t('Contact not found.'), 404);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (empty($cdata['user'])) {
|
|
|
|
throw new \Exception(DI::l10n()->t('Invalid contact.'), 404);
|
|
|
|
}
|
|
|
|
|
|
|
|
$contact = Model\Contact::getById($cdata['user'], ['deleted']);
|
2019-05-01 19:29:04 +00:00
|
|
|
if (!DBA::isResult($contact)) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Contact not found.'), 404);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($contact['deleted']) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Contact is deleted.'), 410);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2021-11-26 14:48:05 +00:00
|
|
|
switch($this->parameters['command']) {
|
2019-05-01 19:29:04 +00:00
|
|
|
case 'add':
|
2021-11-26 14:48:37 +00:00
|
|
|
if (!Model\Group::addMember($group_id, $cdata['user'])) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Unable to add the contact to the group.'), 500);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
2019-12-24 21:44:43 +00:00
|
|
|
|
2020-01-18 19:52:34 +00:00
|
|
|
$message = DI::l10n()->t('Contact successfully added to group.');
|
2019-05-01 19:29:04 +00:00
|
|
|
break;
|
|
|
|
case 'remove':
|
2021-11-26 14:48:37 +00:00
|
|
|
if (!Model\Group::removeMember($group_id, $cdata['user'])) {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Unable to remove the contact from the group.'), 500);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
2019-12-24 21:44:43 +00:00
|
|
|
|
2020-01-18 19:52:34 +00:00
|
|
|
$message = DI::l10n()->t('Contact successfully removed from group.');
|
2019-05-01 19:29:04 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
} else {
|
2020-01-18 19:52:34 +00:00
|
|
|
throw new \Exception(DI::l10n()->t('Bad request.'), 400);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2020-09-07 10:17:42 +00:00
|
|
|
info($message);
|
2019-05-01 19:29:04 +00:00
|
|
|
System::jsonExit(['status' => 'OK', 'message' => $message]);
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
notice($e->getMessage());
|
|
|
|
System::jsonError($e->getCode(), ['status' => 'error', 'message' => $e->getMessage()]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-20 14:38:03 +00:00
|
|
|
protected function content(array $request = []): string
|
2019-05-01 19:29:04 +00:00
|
|
|
{
|
|
|
|
$change = false;
|
|
|
|
|
|
|
|
if (!local_user()) {
|
2019-05-02 03:16:10 +00:00
|
|
|
throw new \Friendica\Network\HTTPException\ForbiddenException();
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2019-12-15 21:34:11 +00:00
|
|
|
$a = DI::app();
|
2019-05-01 19:29:04 +00:00
|
|
|
|
2021-07-25 15:23:37 +00:00
|
|
|
DI::page()['aside'] = Model\Group::sidebarWidget('contact', 'group', 'extended', ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : 'everyone'));
|
2019-05-01 19:29:04 +00:00
|
|
|
|
|
|
|
// With no group number provided we jump to the unassigned contacts as a starting point
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if (DI::args()->getArgc() == 1) {
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('group/none');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Switch to text mode interface if we have more than 'n' contacts or group members
|
2020-01-18 15:50:57 +00:00
|
|
|
$switchtotext = DI::pConfig()->get(local_user(), 'system', 'groupedit_image_limit');
|
2019-05-01 19:29:04 +00:00
|
|
|
if (is_null($switchtotext)) {
|
2020-01-19 20:21:13 +00:00
|
|
|
$switchtotext = DI::config()->get('system', 'groupedit_image_limit', 200);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$tpl = Renderer::getMarkupTemplate('group_edit.tpl');
|
|
|
|
|
|
|
|
|
|
|
|
$context = [
|
2020-01-18 19:52:34 +00:00
|
|
|
'$submit' => DI::l10n()->t('Save Group'),
|
|
|
|
'$submit_filter' => DI::l10n()->t('Filter'),
|
2019-05-01 19:29:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'new')) {
|
2019-05-01 19:29:04 +00:00
|
|
|
return Renderer::replaceMacros($tpl, $context + [
|
2020-01-18 19:52:34 +00:00
|
|
|
'$title' => DI::l10n()->t('Create a group of contacts/friends.'),
|
|
|
|
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), '', ''],
|
2019-05-01 19:29:04 +00:00
|
|
|
'$gid' => 'new',
|
|
|
|
'$form_security_token' => BaseModule::getFormSecurityToken("group_edit"),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
$nogroup = false;
|
|
|
|
|
2019-05-03 06:50:17 +00:00
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'none') ||
|
|
|
|
(DI::args()->getArgc() == 1) && (DI::args()->getArgv()[0] === 'nogroup')) {
|
2019-05-01 19:29:04 +00:00
|
|
|
$id = -1;
|
|
|
|
$nogroup = true;
|
|
|
|
$group = [
|
|
|
|
'id' => $id,
|
2020-01-18 19:52:34 +00:00
|
|
|
'name' => DI::l10n()->t('Contacts not in any group'),
|
2019-05-01 19:29:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
$members = [];
|
|
|
|
$preselected = [];
|
|
|
|
|
|
|
|
$context = $context + [
|
|
|
|
'$title' => $group['name'],
|
2020-01-18 19:52:34 +00:00
|
|
|
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''],
|
2019-05-01 19:29:04 +00:00
|
|
|
'$gid' => $id,
|
|
|
|
'$editable' => 0,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() == 3) && (DI::args()->getArgv()[1] === 'drop')) {
|
2019-05-01 19:29:04 +00:00
|
|
|
BaseModule::checkFormSecurityTokenRedirectOnError('/group', 'group_drop', 't');
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if (intval(DI::args()->getArgv()[2])) {
|
|
|
|
if (!Model\Group::exists(DI::args()->getArgv()[2], local_user())) {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Group not found.'));
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('contact');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2021-07-25 15:23:37 +00:00
|
|
|
if (!Model\Group::remove(DI::args()->getArgv()[2])) {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Unable to remove group.'));
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
}
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('group');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() > 2) && intval(DI::args()->getArgv()[1]) && intval(DI::args()->getArgv()[2])) {
|
2019-05-01 19:29:04 +00:00
|
|
|
BaseModule::checkFormSecurityTokenForbiddenOnError('group_member_change', 't');
|
|
|
|
|
2021-07-25 15:23:37 +00:00
|
|
|
if (DBA::exists('contact', ['id' => DI::args()->getArgv()[2], 'uid' => local_user(), 'self' => false, 'pending' => false, 'blocked' => false])) {
|
|
|
|
$change = intval(DI::args()->getArgv()[2]);
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// @TODO: Replace with parameter from router
|
2021-07-25 15:23:37 +00:00
|
|
|
if ((DI::args()->getArgc() > 1) && intval(DI::args()->getArgv()[1])) {
|
|
|
|
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => local_user(), 'deleted' => false]);
|
2019-05-01 19:29:04 +00:00
|
|
|
if (!DBA::isResult($group)) {
|
2020-01-18 19:52:34 +00:00
|
|
|
notice(DI::l10n()->t('Group not found.'));
|
2019-12-15 23:28:31 +00:00
|
|
|
DI::baseUrl()->redirect('contact');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
2020-08-04 18:22:19 +00:00
|
|
|
$members = Model\Contact\Group::getById($group['id']);
|
2019-05-01 19:29:04 +00:00
|
|
|
$preselected = [];
|
|
|
|
|
|
|
|
if (count($members)) {
|
|
|
|
foreach ($members as $member) {
|
|
|
|
$preselected[] = $member['id'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($change) {
|
|
|
|
if (in_array($change, $preselected)) {
|
|
|
|
Model\Group::removeMember($group['id'], $change);
|
|
|
|
} else {
|
|
|
|
Model\Group::addMember($group['id'], $change);
|
|
|
|
}
|
|
|
|
|
2020-08-04 18:22:19 +00:00
|
|
|
$members = Model\Contact\Group::getById($group['id']);
|
2019-05-01 19:29:04 +00:00
|
|
|
$preselected = [];
|
|
|
|
if (count($members)) {
|
|
|
|
foreach ($members as $member) {
|
|
|
|
$preselected[] = $member['id'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$drop_tpl = Renderer::getMarkupTemplate('group_drop.tpl');
|
|
|
|
$drop_txt = Renderer::replaceMacros($drop_tpl, [
|
|
|
|
'$id' => $group['id'],
|
2020-01-18 19:52:34 +00:00
|
|
|
'$delete' => DI::l10n()->t('Delete Group'),
|
2019-05-01 19:29:04 +00:00
|
|
|
'$form_security_token' => BaseModule::getFormSecurityToken("group_drop"),
|
|
|
|
]);
|
|
|
|
|
|
|
|
$context = $context + [
|
|
|
|
'$title' => $group['name'],
|
2020-01-18 19:52:34 +00:00
|
|
|
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''],
|
2019-05-01 19:29:04 +00:00
|
|
|
'$gid' => $group['id'],
|
|
|
|
'$drop' => $drop_txt,
|
|
|
|
'$form_security_token' => BaseModule::getFormSecurityToken('group_edit'),
|
2020-01-18 19:52:34 +00:00
|
|
|
'$edit_name' => DI::l10n()->t('Edit Group Name'),
|
2019-05-01 19:29:04 +00:00
|
|
|
'$editable' => 1,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($group)) {
|
2019-05-02 03:16:10 +00:00
|
|
|
throw new \Friendica\Network\HTTPException\BadRequestException();
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$groupeditor = [
|
2020-01-18 19:52:34 +00:00
|
|
|
'label_members' => DI::l10n()->t('Members'),
|
2019-05-01 19:29:04 +00:00
|
|
|
'members' => [],
|
2020-01-18 19:52:34 +00:00
|
|
|
'label_contacts' => DI::l10n()->t('All Contacts'),
|
|
|
|
'group_is_empty' => DI::l10n()->t('Group is empty'),
|
2019-05-01 19:29:04 +00:00
|
|
|
'contacts' => [],
|
|
|
|
];
|
|
|
|
|
|
|
|
$sec_token = addslashes(BaseModule::getFormSecurityToken('group_member_change'));
|
|
|
|
|
|
|
|
// Format the data of the group members
|
|
|
|
foreach ($members as $member) {
|
|
|
|
if ($member['url']) {
|
|
|
|
$entry = Contact::getContactTemplateVars($member);
|
|
|
|
$entry['label'] = 'members';
|
|
|
|
$entry['photo_menu'] = '';
|
|
|
|
$entry['change_member'] = [
|
2020-01-18 19:52:34 +00:00
|
|
|
'title' => DI::l10n()->t("Remove contact from group"),
|
2019-05-01 19:29:04 +00:00
|
|
|
'gid' => $group['id'],
|
|
|
|
'cid' => $member['id'],
|
|
|
|
'sec_token' => $sec_token
|
|
|
|
];
|
|
|
|
|
|
|
|
$groupeditor['members'][] = $entry;
|
|
|
|
} else {
|
|
|
|
Model\Group::removeMember($group['id'], $member['id']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($nogroup) {
|
2020-08-05 03:36:37 +00:00
|
|
|
$contacts = Model\Contact\Group::listUngrouped(local_user());
|
2019-05-01 19:29:04 +00:00
|
|
|
} else {
|
|
|
|
$contacts_stmt = DBA::select('contact', [],
|
2021-03-07 20:15:25 +00:00
|
|
|
['rel' => [Model\Contact::FOLLOWER, Model\Contact::FRIEND, Model\Contact::SHARING],
|
|
|
|
'uid' => local_user(), 'pending' => false, 'blocked' => false, 'failed' => false, 'self' => false],
|
2019-05-01 19:29:04 +00:00
|
|
|
['order' => ['name']]
|
|
|
|
);
|
|
|
|
$contacts = DBA::toArray($contacts_stmt);
|
2020-01-18 19:52:34 +00:00
|
|
|
$context['$desc'] = DI::l10n()->t('Click on a contact to add or remove.');
|
2019-05-01 19:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (DBA::isResult($contacts)) {
|
|
|
|
// Format the data of the contacts who aren't in the contact group
|
|
|
|
foreach ($contacts as $member) {
|
|
|
|
if (!in_array($member['id'], $preselected)) {
|
|
|
|
$entry = Contact::getContactTemplateVars($member);
|
|
|
|
$entry['label'] = 'contacts';
|
|
|
|
if (!$nogroup)
|
|
|
|
$entry['photo_menu'] = [];
|
|
|
|
|
|
|
|
if (!$nogroup) {
|
|
|
|
$entry['change_member'] = [
|
2020-01-18 19:52:34 +00:00
|
|
|
'title' => DI::l10n()->t("Add contact to group"),
|
2019-05-01 19:29:04 +00:00
|
|
|
'gid' => $group['id'],
|
|
|
|
'cid' => $member['id'],
|
|
|
|
'sec_token' => $sec_token
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
$groupeditor['contacts'][] = $entry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$context['$groupeditor'] = $groupeditor;
|
|
|
|
|
|
|
|
// If there are to many contacts we could provide an alternative view mode
|
|
|
|
$total = count($groupeditor['members']) + count($groupeditor['contacts']);
|
|
|
|
$context['$shortmode'] = (($switchtotext && ($total > $switchtotext)) ? true : false);
|
|
|
|
|
|
|
|
if ($change) {
|
|
|
|
$tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
|
|
|
|
echo Renderer::replaceMacros($tpl, $context);
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
return Renderer::replaceMacros($tpl, $context);
|
|
|
|
}
|
2019-02-23 20:33:55 +00:00
|
|
|
}
|