From 6ab84bf52070642c5f815e87a3794fe7f0522984 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 11:04:29 +0100 Subject: [PATCH] added curly braces + space between "if" and brace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/group.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mod/group.php b/mod/group.php index c4854a602d..d50b39022a 100644 --- a/mod/group.php +++ b/mod/group.php @@ -28,15 +28,18 @@ function group_post(&$a) { if($r) { info( t('Group created.') . EOL ); $r = group_byname(local_user(),$name); - if($r) + if ($r) { goaway(App::get_baseurl() . '/group/' . $r); + } } - else + else { notice( t('Could not create group.') . EOL ); + } goaway(App::get_baseurl() . '/group'); return; // NOTREACHED } - if(($a->argc == 2) && (intval($a->argv[1]))) { + + if (($a->argc == 2) && (intval($a->argv[1]))) { check_form_security_token_redirectOnErr('/group', 'group_edit'); $r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1", @@ -50,14 +53,16 @@ function group_post(&$a) { } $group = $r[0]; $groupname = notags(trim($_POST['groupname'])); - if((strlen($groupname)) && ($groupname != $group['name'])) { + if ((strlen($groupname)) && ($groupname != $group['name'])) { $r = q("UPDATE `group` SET `name` = '%s' WHERE `uid` = %d AND `id` = %d", dbesc($groupname), intval(local_user()), intval($group['id']) ); - if($r) + + if ($r) { info( t('Group name changed.') . EOL ); + } } $a->page['aside'] = group_side(); -- 2.39.5