]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Group.php
EOL removed
[friendica.git] / src / Module / Group.php
index ead70c333ec6ccb637e107862c4d87e2df94042a..d5f1fc8ef8430bee958096997dd5b7ae26532355 100644 (file)
@@ -1,12 +1,27 @@
 <?php
 /**
- * @file src/Module/Group.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @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/>.
+ *
  */
 
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
-use Friendica\Core\Config;
 use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
@@ -38,7 +53,6 @@ class Group extends BaseModule
                        $name = Strings::escapeTags(trim($_POST['groupname']));
                        $r = Model\Group::create(local_user(), $name);
                        if ($r) {
-                               info(DI::l10n()->t('Group created.'));
                                $r = Model\Group::getIdByName(local_user(), $name);
                                if ($r) {
                                        DI::baseUrl()->redirect('group/' . $r);
@@ -60,8 +74,8 @@ class Group extends BaseModule
                        }
                        $groupname = Strings::escapeTags(trim($_POST['groupname']));
                        if (strlen($groupname) && ($groupname != $group['name'])) {
-                               if (Model\Group::update($group['id'], $groupname)) {
-                                       info(DI::l10n()->t('Group name changed.'));
+                               if (!Model\Group::update($group['id'], $groupname)) {
+                                       notice(DI::l10n()->t('Group name was not changed.'));
                                }
                        }
                }
@@ -201,9 +215,7 @@ class Group extends BaseModule
                                        DI::baseUrl()->redirect('contact');
                                }
 
-                               if (Model\Group::remove($a->argv[2])) {
-                                       info(DI::l10n()->t('Group removed.'));
-                               } else {
+                               if (!Model\Group::remove($a->argv[2])) {
                                        notice(DI::l10n()->t('Unable to remove group.'));
                                }
                        }