Completed
Push — 1.10.x ( c82817...6a93c3 )
by Yannick
202:42 queued 149:59
created
main/social/invitations.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
10 10
 
11 11
 api_block_anonymous_users();
12 12
 
13
-if (api_get_setting('allow_social_tool') !='true') {
13
+if (api_get_setting('allow_social_tool') != 'true') {
14 14
     api_not_allowed();
15 15
 }
16 16
 
17 17
 $this_section = SECTION_SOCIAL;
18 18
 
19
-$interbreadcrumb[] = array ('url' =>'profile.php','name' => get_lang('SocialNetwork'));
20
-$interbreadcrumb[] = array ('url' =>'#','name' => get_lang('Invitations'));
19
+$interbreadcrumb[] = array('url' =>'profile.php', 'name' => get_lang('SocialNetwork'));
20
+$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Invitations'));
21 21
 
22 22
 if (is_array($_GET) && count($_GET) > 0) {
23 23
     foreach ($_GET as $key => $value) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                         Display::return_message(get_lang('UserIsSubscribedToThisGroup'), 'success')
39 39
                     );
40 40
 
41
-                    header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
41
+                    header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
42 42
                     exit;
43 43
                 }
44 44
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                         Display::return_message(get_lang('UserIsAlreadySubscribedToThisGroup'), 'warning')
55 55
                     );
56 56
 
57
-                    header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
57
+                    header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
58 58
                     exit;
59 59
                 }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                     Display::return_message(get_lang('UserIsNotSubscribedToThisGroup'), 'warning')
63 63
                 );
64 64
 
65
-                header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
65
+                header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
66 66
                 exit;
67 67
                 break;
68 68
             case 'deny':
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                     Display::return_message(get_lang('GroupInvitationWasDeny'))
73 73
                 );
74 74
 
75
-                header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
75
+                header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
76 76
                 exit;
77 77
         }
78 78
     }
@@ -133,24 +133,24 @@  discard block
 block discarded – undo
133 133
         $invitationHtml .= '<div class="btn-group" role="group">';
134 134
         $invitationHtml .= Display::toolbarButton(
135 135
             get_lang('AcceptInvitation'),
136
-            api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([
136
+            api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([
137 137
                 'a' => 'add_friend',
138 138
                 'friend_id' => $sender_user_id,
139 139
                 'is_my_friend' => 'friend'
140 140
             ]),
141 141
             'check',
142 142
             'success',
143
-            ['id' => 'btn-accept-' . $sender_user_id]
143
+            ['id' => 'btn-accept-'.$sender_user_id]
144 144
         );
145 145
         $invitationHtml .= Display::toolbarButton(
146 146
             get_lang('DenyInvitation'),
147
-            api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([
147
+            api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([
148 148
                 'a' => 'deny_friend',
149 149
                 'denied_friend_id' => $sender_user_id,
150 150
             ]),
151 151
             'times',
152 152
             'danger',
153
-            ['id' => 'btn-deny-' . $sender_user_id]
153
+            ['id' => 'btn-deny-'.$sender_user_id]
154 154
         );
155 155
         $invitationHtml .= '</div>';
156 156
         $invitationHtml .= '</div>';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $invitationSentHtml .= '<div class="col-md-9">';
179 179
         $invitationSentHtml .= '<h4 class="title-profile"><a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.$user_info['complete_name'].'</a></h4>';
180 180
         $invitationSentHtml .= '<div class="content-invitation">'.$title.' : '.$content.'</div>';
181
-        $invitationSentHtml .= '<div class="date-invitation">'. get_lang('DateSend').' : '.$date.'</div>';
181
+        $invitationSentHtml .= '<div class="date-invitation">'.get_lang('DateSend').' : '.$date.'</div>';
182 182
         $invitationSentHtml .= '</div>';
183 183
         $invitationSentHtml .= '</div></div>';
184 184
     }
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
         );
197 197
         $img = '<img class="social-groups-image" src="'.$picture['file'].'" />';
198 198
         $invitation['picture_uri'] = '<a href="group_view.php?id='.$invitation['id'].'">'.$img.'</a>';
199
-        $invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
200
-        $invitation['description'] = cut($invitation['description'],220,true);
201
-        $new_invitation[]=$invitation;
199
+        $invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'], 120, true).'</a>';
200
+        $invitation['description'] = cut($invitation['description'], 220, true);
201
+        $new_invitation[] = $invitation;
202 202
 
203 203
         $waitingInvitation .= '<div class="well"><div class="row">';
204 204
         $waitingInvitation .= '<div class="col-md-3">'.$invitation['picture_uri'].'</div>';
@@ -208,19 +208,19 @@  discard block
 block discarded – undo
208 208
         $waitingInvitation .= '<div class="btn-group" role="group">';
209 209
         $waitingInvitation .= Display::toolbarButton(
210 210
             get_lang('AcceptInvitation'),
211
-            api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['accept' => $invitation['id']]),
211
+            api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['accept' => $invitation['id']]),
212 212
             'check',
213 213
             'success',
214
-            ['id' => 'accept-invitation-' . $invitation['id']]
214
+            ['id' => 'accept-invitation-'.$invitation['id']]
215 215
         );
216 216
         $waitingInvitation .= Display::toolbarButton(
217 217
             get_lang('DenyInvitation'),
218
-            api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['deny' => $invitation['id']]),
218
+            api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['deny' => $invitation['id']]),
219 219
             'times',
220 220
             'danger',
221
-            ['id' => 'deny-invitation-' . $invitation['id']]
221
+            ['id' => 'deny-invitation-'.$invitation['id']]
222 222
         );
223
-        $waitingInvitation .='</div>';
223
+        $waitingInvitation .= '</div>';
224 224
         $waitingInvitation .= '</div></div>';
225 225
     }
226 226
     $socialInvitationsBlock .= Display::panel($waitingInvitation, get_lang('GroupsWaitingApproval'));
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 $tpl = new Template(null);
230 230
 SocialManager::setSocialUserBlock($tpl, $user_id, 'invitations');
231 231
 $tpl->assign('social_menu_block', $social_menu_block);
232
-$tpl->assign('social_invitations_block',$socialInvitationsBlock);
232
+$tpl->assign('social_invitations_block', $socialInvitationsBlock);
233 233
 $tpl->assign('content', $content);
234 234
 $social_layout = $tpl->get_template('social/invitations.tpl');
235 235
 $tpl->display($social_layout);
Please login to merge, or discard this patch.
main/social/profile_friends_and_groups.inc.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         );
33 33
         $number_friends = count($friends);
34 34
         $friend_html = '';
35
-        $friend_html .= '<div><h3>' . get_lang('SocialFriend') . '</h3></div>';
35
+        $friend_html .= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
36 36
         $friend_html .= '<div id="friend-container" class="social-friend-container">';
37 37
         $friend_html .= '<div id="friend-header" >';
38 38
 
39 39
         if ($number_friends == 1) {
40
-            $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friend') . '</div>';
40
+            $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friend').'</div>';
41 41
         } else {
42
-            $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friends') . '</div>';
42
+            $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friends').'</div>';
43 43
         }
44 44
 
45 45
         $friend_html .= '</div>'; // close div friend-header
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
                     $friend['firstName'],
52 52
                     $friend['lastName']
53 53
                 );
54
-                $friend_html .= '<div id=div_' . $friend['friend_user_id'] . ' class="image_friend_network" ><span><center>';
54
+                $friend_html .= '<div id=div_'.$friend['friend_user_id'].' class="image_friend_network" ><span><center>';
55 55
 
56 56
                 $userPicture = UserManager::getUserPicture($friend['friend_user_id']);
57 57
 
58
-                $friend_html .= '<a href="profile.php?u=' . $friend['friend_user_id'].'">';
59
-                $friend_html .= '<img src="' . $userPicture . '" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $name_user . '" />';
58
+                $friend_html .= '<a href="profile.php?u='.$friend['friend_user_id'].'">';
59
+                $friend_html .= '<img src="'.$userPicture.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" />';
60 60
                 $friend_html .= '</center></span>';
61
-                $friend_html .= '<center class="friend">' . $name_user . '</a></center>';
61
+                $friend_html .= '<center class="friend">'.$name_user.'</a></center>';
62 62
                 $friend_html .= '</div>';
63 63
             }
64 64
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $i = 1;
74 74
             foreach ($results as $result) {
75 75
                 $id = $result['id'];
76
-                $url_open = '<a href="group_view.php?id=' . $id . '">';
76
+                $url_open = '<a href="group_view.php?id='.$id.'">';
77 77
                 $url_close = '</a>';
78 78
                 $icon = '';
79 79
                 $name = cut($result['name'], 20, true);
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
                     $userGroup->get_all_users_by_group($id)
95 95
                 );
96 96
                 if ($count_users_group == 1) {
97
-                    $count_users_group = $count_users_group . ' ' . get_lang(
97
+                    $count_users_group = $count_users_group.' '.get_lang(
98 98
                             'Member'
99 99
                         );
100 100
                 } else {
101
-                    $count_users_group = $count_users_group . ' ' . get_lang(
101
+                    $count_users_group = $count_users_group.' '.get_lang(
102 102
                             'Members'
103 103
                         );
104 104
                 }
@@ -107,40 +107,40 @@  discard block
 block discarded – undo
107 107
                     $result['picture_uri'],
108 108
                     80
109 109
                 );
110
-                $item_name = '<div class="box_shared_profile_group_title">' . $url_open . api_xml_http_response_encode($name) . $icon . $url_close . '</div>';
110
+                $item_name = '<div class="box_shared_profile_group_title">'.$url_open.api_xml_http_response_encode($name).$icon.$url_close.'</div>';
111 111
                 $item_description = '';
112 112
                 if (!empty($result['description'])) {
113 113
                     $item_description = '<div class="box_shared_profile_group_description">
114 114
                         <span class="social-groups-text2">' .
115
-                        api_xml_http_response_encode(get_lang('Description')) . '</span><p class="social-groups-text4">' .
116
-                        cut(api_xml_http_response_encode($result['description']), 120, true ) . '</p></div>';
115
+                        api_xml_http_response_encode(get_lang('Description')).'</span><p class="social-groups-text4">'.
116
+                        cut(api_xml_http_response_encode($result['description']), 120, true).'</p></div>';
117 117
                 }
118 118
 
119 119
                 $result['picture_uri'] = '<div class="box_shared_profile_group_image">
120
-                                          <img class="social-groups-image" src="' . $picture['file'] . '" /></div>';
120
+                                          <img class="social-groups-image" src="' . $picture['file'].'" /></div>';
121 121
                 $item_actions = '';
122 122
                 if (api_get_user_id() == $user_id) {
123
-                    $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id=' . $id . '">' .
124
-                        get_lang('SeeMore') . $url_close . '</div>';
123
+                    $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id='.$id.'">'.
124
+                        get_lang('SeeMore').$url_close.'</div>';
125 125
                 }
126 126
                 $grid_my_groups[] = array(
127 127
                     $item_name,
128
-                    $url_open . $result['picture_uri'] . $url_close,
129
-                    $item_description . $item_actions
128
+                    $url_open.$result['picture_uri'].$url_close,
129
+                    $item_description.$item_actions
130 130
                 );
131 131
                 $i++;
132 132
             }
133 133
         }
134 134
         if (count($grid_my_groups) > 0) {
135 135
             echo '<div style="margin-top:20px">';
136
-            echo '<div><h3>' . get_lang('MyGroups') . '</h3></div>';
136
+            echo '<div><h3>'.get_lang('MyGroups').'</h3></div>';
137 137
             $count_groups = 0;
138 138
             if (count($results) == 1) {
139
-                $count_groups = count($results) . ' ' . get_lang('Group');
139
+                $count_groups = count($results).' '.get_lang('Group');
140 140
             } else {
141
-                $count_groups = count($results) . ' ' . get_lang('Groups');
141
+                $count_groups = count($results).' '.get_lang('Groups');
142 142
             }
143
-            echo '<div>' . $count_groups . '</div>';
143
+            echo '<div>'.$count_groups.'</div>';
144 144
 
145 145
             Display::display_sortable_grid(
146 146
                 'shared_profile_mygroups',
Please login to merge, or discard this patch.
main/social/myfiles.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		beforeSend: function(objeto) {
41 41
 		$("#id_response").html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
42 42
 		type: "POST",
43
-		url: "' . api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?a=deny_friend",
43
+		url: "' . api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=deny_friend",
44 44
 		data: "denied_friend_id="+friend_user_id,
45 45
 		success: function(datos) {
46 46
 		 $("div#"+name_div_id).hide("slow");
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	});
50 50
 }
51 51
 function register_friend(element_input) {
52
-    if(confirm("' . get_lang('AddToFriends') . '")) {
52
+    if(confirm("' . get_lang('AddToFriends').'")) {
53 53
     	name_button=$(element_input).attr("id");
54 54
     	name_div_id="id_"+name_button.substring(13);
55 55
     	user_id=name_div_id.split("_");
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     		beforeSend: function(objeto) {
60 60
     		$("div#dpending_"+user_friend_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
61 61
     		type: "POST",
62
-    		url: "' . api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?a=add_friend",
62
+    		url: "' . api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend",
63 63
     		data: "friend_id="+user_friend_id+"&is_my_friend="+"friend",
64 64
     		success: function(datos) {  $("div#"+name_div_id).hide("slow");
65 65
     			$("form").submit()
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
 $(document).on("ready", function () {
72 72
     $("#el-finder").elfinder({
73
-        url: "' . api_get_path(WEB_LIBRARY_PATH) . 'elfinder/php/connector.php",
74
-        lang: "' . api_get_language_isocode() . '",
73
+        url: "' . api_get_path(WEB_LIBRARY_PATH).'elfinder/php/connector.php",
74
+        lang: "' . api_get_language_isocode().'",
75 75
         height: 600,
76 76
         resizable: false,
77 77
         rememberLastDir: false,
@@ -85,22 +85,22 @@  discard block
 block discarded – undo
85 85
 $actions = null;
86 86
 
87 87
 if (isset($_GET['cidReq'])) {
88
-    $actions = '<a href="' . api_get_path(
88
+    $actions = '<a href="'.api_get_path(
89 89
             WEB_CODE_PATH
90
-        ) . 'document/document.php?cidReq=' . Security::remove_XSS(
90
+        ).'document/document.php?cidReq='.Security::remove_XSS(
91 91
             $_GET['cidReq']
92
-        ) . '&amp;id_session=' . Security::remove_XSS(
92
+        ).'&amp;id_session='.Security::remove_XSS(
93 93
             $_GET['id_session']
94
-        ) . '&amp;gidReq=' . Security::remove_XSS(
94
+        ).'&amp;gidReq='.Security::remove_XSS(
95 95
             $_GET['gidReq']
96
-        ) . '&amp;id=' . Security::remove_XSS(
96
+        ).'&amp;id='.Security::remove_XSS(
97 97
             $_GET['parent_id']
98
-        ) . '">' . Display::return_icon(
98
+        ).'">'.Display::return_icon(
99 99
             'back.png',
100
-            get_lang('BackTo') . ' ' . get_lang('Documents') . ' (' . get_lang(
100
+            get_lang('BackTo').' '.get_lang('Documents').' ('.get_lang(
101 101
                 'Course'
102
-            ) . ')'
103
-        ) . '</a>';
102
+            ).')'
103
+        ).'</a>';
104 104
 }
105 105
 $tpl = new Template();
106 106
 SocialManager::setSocialUserBlock($tpl, $user_id, 'myfiles');
Please login to merge, or discard this patch.
main/social/skills_ranking.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 //Add the JS needed to use the jqgrid
14 14
 $htmlHeadXtra[] = api_get_jqgrid_js();
15 15
 
16
-$interbreadcrumb[] = array("url" => "index.php","name" => get_lang('Skills'));
16
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('Skills'));
17 17
 
18 18
 //jqgrid will use this URL to do the selects
19 19
 $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_skill_ranking';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     get_lang('Rank')
29 29
 );
30 30
 
31
-$column_model   = array(
31
+$column_model = array(
32 32
     array(
33 33
         'name' => 'photo',
34 34
         'index' => 'photo',
Please login to merge, or discard this patch.
main/social/group_topics.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 require_once '../inc/global.inc.php';
11 11
 
12 12
 api_block_anonymous_users();
13
-if (api_get_setting('allow_social_tool') !='true') {
13
+if (api_get_setting('allow_social_tool') != 'true') {
14 14
     api_not_allowed();
15 15
 }
16 16
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     if ($_POST['action'] == 'edit_message_group') {
67
-        $edit_message_id =  intval($_POST['message_id']);
67
+        $edit_message_id = intval($_POST['message_id']);
68 68
         $res = MessageManager::send_message(
69 69
             0,
70 70
             $title,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     // display error messages
98 98
     if (!$res) {
99
-        $social_right_content .= Display::return_message(get_lang('Error'),'error');
99
+        $social_right_content .= Display::return_message(get_lang('Error'), 'error');
100 100
     }
101 101
     $topic_id = isset($_GET['topic_id']) ? intval($_GET['topic_id']) : null;
102 102
     if ($_POST['action'] == 'add_message_group') {
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
 </script>';
195 195
 
196 196
 $this_section = SECTION_SOCIAL;
197
-$interbreadcrumb[] = array('url' => 'groups.php',   'name' => get_lang('Groups'));
197
+$interbreadcrumb[] = array('url' => 'groups.php', 'name' => get_lang('Groups'));
198 198
 $interbreadcrumb[] = array('url' => 'group_view.php?id='.$group_id, 'name' => Security::remove_XSS($group_info['name']));
199
-$interbreadcrumb[] = array('url' => '#',  'name' => get_lang('Discussions'));
199
+$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Discussions'));
200 200
 
201 201
 $social_left_content = SocialManager::show_social_menu('member_list', $group_id);
202 202
 $show_message = null;
Please login to merge, or discard this patch.
main/social/message_for_group_form.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 require_once '../inc/global.inc.php';
11 11
 
12 12
 api_block_anonymous_users();
13
-if (api_get_setting('allow_social_tool') !='true') {
13
+if (api_get_setting('allow_social_tool') != 'true') {
14 14
     api_not_allowed();
15 15
 }
16 16
 
17 17
 $tok = Security::get_token();
18 18
 
19 19
 if (isset($_REQUEST['user_friend'])) {
20
-    $info_user_friend=array();
21
-    $info_path_friend=array();
20
+    $info_user_friend = array();
21
+    $info_path_friend = array();
22 22
     $userfriend_id = intval($_REQUEST['user_friend']);
23 23
     $info_user_friend = api_get_user_info($userfriend_id);
24
-    $info_path_friend = UserManager::get_user_picture_path_by_id($userfriend_id,'web');
24
+    $info_path_friend = UserManager::get_user_picture_path_by_id($userfriend_id, 'web');
25 25
 }
26 26
 
27 27
 $group_id = isset($_GET['group_id']) ? intval($_GET['group_id']) : null;
28 28
 $message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null;
29 29
 $actions = array('add_message_group', 'edit_message_group', 'reply_message_group');
30 30
 
31
-$allowed_action = isset($_GET['action']) && in_array($_GET['action'],$actions) ? Security::remove_XSS($_GET['action']):'';
31
+$allowed_action = isset($_GET['action']) && in_array($_GET['action'], $actions) ? Security::remove_XSS($_GET['action']) : '';
32 32
 
33 33
 $to_group = '';
34 34
 $subject = '';
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
     }
55 55
 }
56 56
 
57
-$page_item = !empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']):1;
58
-$param_item_page = isset($_GET['items_page_nr']) && isset($_GET['topic_id']) ? ('&items_'.intval($_GET['topic_id']).'_page_nr='.(!empty($_GET['topics_page_nr'])?intval($_GET['topics_page_nr']):1)):'';
57
+$page_item = !empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1;
58
+$param_item_page = isset($_GET['items_page_nr']) && isset($_GET['topic_id']) ? ('&items_'.intval($_GET['topic_id']).'_page_nr='.(!empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1)) : '';
59 59
 if (isset($_GET['topic_id'])) {
60 60
     $param_item_page .= '&topic_id='.intval($_GET['topic_id']);
61 61
 }
62
-$page_topic  = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1;
63
-$anchor_topic  = isset($_GET['anchor_topic']) ? Security::remove_XSS($_GET['anchor_topic']) : null;
62
+$page_topic = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1;
63
+$anchor_topic = isset($_GET['anchor_topic']) ? Security::remove_XSS($_GET['anchor_topic']) : null;
64 64
 
65 65
 $url = api_get_path(WEB_CODE_PATH).'social/group_topics.php?id='.$group_id.'&anchor_topic='.$anchor_topic.'&topics_page_nr='.$page_topic.$param_item_page;
66 66
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 $tpl = new Template(get_lang('Groups'));
75 75
 
76
-if (api_get_setting('allow_message_tool')=='true') {
76
+if (api_get_setting('allow_message_tool') == 'true') {
77 77
     // Normal message
78 78
     $user_info = api_get_user_info($userfriend_id);
79 79
     $height = 180;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         '
91 91
             <div id="link-more-attach">
92 92
                 <a class="btn btn-default" href="javascript://" onclick="return add_image_form()">
93
-                    ' . get_lang('AddOneMoreFile') . '
93
+                    ' . get_lang('AddOneMoreFile').'
94 94
                 </a>
95 95
             </div>
96 96
         '
Please login to merge, or discard this patch.
main/social/group_invitation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Database Table Definitions
20 20
 $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
21
-$tbl_group_rel_user	= Database::get_main_table(TABLE_USERGROUP_REL_USER);
21
+$tbl_group_rel_user = Database::get_main_table(TABLE_USERGROUP_REL_USER);
22 22
 
23 23
 // setting the name of the tool
24 24
 $tool_name = get_lang('SubscribeUsersToGroup');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     }
41 41
 }
42 42
 
43
-$interbreadcrumb[] = array('url' =>'groups.php','name' => get_lang('Groups'));
43
+$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
44 44
 $interbreadcrumb[] = array('url' => 'group_view.php?id='.$group_id, 'name' => $group_info['name']);
45 45
 $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('SubscribeUsersToGroup'));
46 46
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         if (is_array($user_list) && count($user_list) > 0) {
76 76
             //send invitation message
77
-            foreach ($user_list as $user_id){
77
+            foreach ($user_list as $user_id) {
78 78
                 $result = MessageManager::send_message(
79 79
                     $user_id,
80 80
                     $title,
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 
111 111
             if (!isset($group_friend_list[$group_id]) ||
112 112
                 isset($group_friend_list[$group_id]) &&
113
-                $group_friend_list[$group_id]['relation_type'] == '' ) {
114
-                $Users[$friend['friend_user_id']]= array(
113
+                $group_friend_list[$group_id]['relation_type'] == '') {
114
+                $Users[$friend['friend_user_id']] = array(
115 115
                     'user_id' => $friend['friend_user_id'],
116 116
                     'firstname' => $friend['firstName'],
117 117
                     'lastname' => $friend['lastName'],
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 );
121 121
             }
122 122
         } else {
123
-            $Users[$friend['friend_user_id']]= array(
123
+            $Users[$friend['friend_user_id']] = array(
124 124
                 'user_id' => $friend['friend_user_id'],
125 125
                 'firstname' =>$friend['firstName'],
126 126
                 'lastname' => $friend['lastName'],
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     }
132 132
 }
133 133
 
134
-if (is_array($Users) && count($Users) > 0 ) {
134
+if (is_array($Users) && count($Users) > 0) {
135 135
     foreach ($Users as $user) {
136 136
         if ($user['group_id'] != $group_id) {
137 137
             $nosessionUsersList[$user['user_id']] = api_get_person_name(
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 }
144 144
 
145 145
 $social_left_content = SocialManager::show_social_menu('invite_friends', $group_id);
146
-$social_right_content =  '<h2>'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h2>';
146
+$social_right_content = '<h2>'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h2>';
147 147
 
148 148
 if (count($nosessionUsersList) == 0) {
149 149
     $friends = SocialManager::get_friends(api_get_user_id());
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     array(GROUP_USER_PERMISSION_PENDING_INVITATION)
180 180
 );
181 181
 
182
-if (is_array($members) && count($members)>0) {
182
+if (is_array($members) && count($members) > 0) {
183 183
     foreach ($members as &$member) {
184 184
         $image = UserManager::getUserPicture($member['id']);
185 185
         $member['image'] = '<img src="'.$image.'"  width="50px" height="50px"  />';
Please login to merge, or discard this patch.
main/social/groups.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -12,30 +12,30 @@  discard block
 block discarded – undo
12 12
 
13 13
 api_block_anonymous_users();
14 14
 
15
-if (api_get_setting('allow_social_tool') !='true') {
15
+if (api_get_setting('allow_social_tool') != 'true') {
16 16
     api_not_allowed();
17 17
 }
18 18
 $join_url = '';
19 19
 
20 20
 $this_section = SECTION_SOCIAL;
21
-$allowed_views = array('mygroups','newest','pop');
21
+$allowed_views = array('mygroups', 'newest', 'pop');
22 22
 $content = null;
23 23
 
24 24
 if (isset($_GET['view']) && in_array($_GET['view'], $allowed_views)) {
25 25
     if ($_GET['view'] == 'mygroups') {
26
-        $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
27
-        $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('MyGroups'));
28
-    } else if ( $_GET['view'] == 'newest') {
29
-        $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
30
-        $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Newest'));
31
-    } else  {
32
-        $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
33
-        $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Popular'));
26
+        $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
27
+        $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('MyGroups'));
28
+    } else if ($_GET['view'] == 'newest') {
29
+        $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
30
+        $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Newest'));
31
+    } else {
32
+        $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
33
+        $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Popular'));
34 34
     }
35 35
 } else {
36
-    $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
36
+    $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
37 37
     if (!isset($_GET['id'])) {
38
-        $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('GroupList'));
38
+        $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('GroupList'));
39 39
     }
40 40
 }
41 41
 
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
         } elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
73 73
             $name .= ' '.Display::return_icon('social_group_moderator.png', get_lang('Moderator'), array('style'=>'vertical-align:middle'));
74 74
         }
75
-        $url  = '<a href="group_view.php?id='.$id.'">' . $name . '</a>';
75
+        $url = '<a href="group_view.php?id='.$id.'">'.$name.'</a>';
76 76
         
77
-        $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
78
-        if ($count_users_group == 1 ) {
77
+        $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0, 1000));
78
+        if ($count_users_group == 1) {
79 79
             $count_users_group = $count_users_group.' '.get_lang('Member');
80 80
         } else {
81 81
             $count_users_group = $count_users_group.' '.get_lang('Members');
82 82
         }
83 83
 
84
-        $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
84
+        $picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80);
85 85
         $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
86 86
         
87 87
         $members = Display::returnFontAwesomeIcon('user').$count_users_group;
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         $html .= '<div class="title-groups">';
94 94
         $html .= Display::tag('h5', $url);
95 95
         $html .= '</div>';
96
-        $html .= '<div class="members-groups">' . $members . '</div>';
96
+        $html .= '<div class="members-groups">'.$members.'</div>';
97 97
         if ($result['description'] != '') {
98
-            $html .= '<div class="description-groups">' . cut($result['description'],100,true) . '</div>';
98
+            $html .= '<div class="description-groups">'.cut($result['description'], 100, true).'</div>';
99 99
         } else {
100 100
             $html .= '';
101 101
         }
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
         $html .= '</div>';
104 104
         
105 105
         $grid_item_2 = $html;
106
-        $grid_my_groups[]= array($grid_item_2);
106
+        $grid_my_groups[] = array($grid_item_2);
107 107
     }
108 108
 }
109 109
 
110 110
 // Newest groups
111
-$results = $usergroup->get_groups_by_age(4,false);
111
+$results = $usergroup->get_groups_by_age(4, false);
112 112
 
113 113
 $grid_newest_groups = array();
114 114
 foreach ($results as $result) {
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
     $id = $result['id'];
118 118
     $name = cut($result['name'], GROUP_TITLE_LENGTH, true);
119 119
     
120
-    $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
121
-    if ($count_users_group == 1 ) {
120
+    $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0, 1000));
121
+    if ($count_users_group == 1) {
122 122
         $count_users_group = $count_users_group.' '.get_lang('Member');
123 123
     } else {
124 124
         $count_users_group = $count_users_group.' '.get_lang('Members');
125 125
     }
126 126
 
127
-    $url  = '<a href="group_view.php?id='.$id.'">' . $name . '</a>';
127
+    $url = '<a href="group_view.php?id='.$id.'">'.$name.'</a>';
128 128
     
129
-    $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
129
+    $picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80);
130 130
     $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
131 131
     $members = Display::returnFontAwesomeIcon('user').$count_users_group;
132 132
     
@@ -138,15 +138,15 @@  discard block
 block discarded – undo
138 138
     $html .= '<div class="title-groups">';
139 139
     $html .= Display::tag('h5', $url);
140 140
     $html .= '</div>';
141
-    $html .= '<div class="members-groups">' . $members . '</div>';
141
+    $html .= '<div class="members-groups">'.$members.'</div>';
142 142
     if ($result['description'] != '') {
143
-        $html .= '<div class="description-groups">' . cut($result['description'],100,true) . '</div>';
143
+        $html .= '<div class="description-groups">'.cut($result['description'], 100, true).'</div>';
144 144
     } else {
145 145
         $html .= '';
146 146
     }
147 147
     //Avoiding my groups
148 148
 
149
-    if (!in_array($id,$my_group_list)) {
149
+    if (!in_array($id, $my_group_list)) {
150 150
         $html .= '<a class="btn" href="group_view.php?id='.$id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a> ';
151 151
     }
152 152
     
@@ -157,11 +157,11 @@  discard block
 block discarded – undo
157 157
     
158 158
     $grid_item_2 = $html;
159 159
 
160
-    $grid_newest_groups[]= array($grid_item_2);
160
+    $grid_newest_groups[] = array($grid_item_2);
161 161
 }
162 162
 
163 163
 // Pop groups
164
-$results = $usergroup->get_groups_by_popularity(4,false);
164
+$results = $usergroup->get_groups_by_popularity(4, false);
165 165
 $grid_pop_groups = array();
166 166
 
167 167
 if (is_array($results) && count($results) > 0) {
@@ -169,18 +169,18 @@  discard block
 block discarded – undo
169 169
         $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
170 170
         $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
171 171
         $id = $result['id'];
172
-        $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
172
+        $name = cut($result['name'], GROUP_TITLE_LENGTH, true);
173 173
 
174
-        $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
175
-        if ($count_users_group == 1 ) {
174
+        $count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0, 1000));
175
+        if ($count_users_group == 1) {
176 176
             $count_users_group = $count_users_group.' '.get_lang('Member');
177 177
         } else {
178 178
             $count_users_group = $count_users_group.' '.get_lang('Members');
179 179
         }
180 180
 
181
-        $url  = '<a href="group_view.php?id='.$id.'">' . $name . '</a>';
181
+        $url = '<a href="group_view.php?id='.$id.'">'.$name.'</a>';
182 182
         
183
-        $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
183
+        $picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80);
184 184
         $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
185 185
 
186 186
         $html = '<div class="row">';
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
         $html .= '<div class="title-groups">';
192 192
         $html .= Display::tag('h5', $url);
193 193
         $html .= '</div>';
194
-        $html .= '<div class="members-groups">' . $members . '</div>';
194
+        $html .= '<div class="members-groups">'.$members.'</div>';
195 195
         if ($result['description'] != '') {
196
-            $html .= '<div class="description-groups">' . cut($result['description'],100,true) . '</div>';
196
+            $html .= '<div class="description-groups">'.cut($result['description'], 100, true).'</div>';
197 197
         } else {
198 198
             $html .= '';
199 199
         }
200 200
         //Avoiding my groups
201 201
 
202
-        if (!in_array($id,$my_group_list)) {
202
+        if (!in_array($id, $my_group_list)) {
203 203
             $html .= '<a class="btn" href="group_view.php?id='.$id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a> ';
204 204
         }
205 205
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $html .= '</div>';
209 209
 
210 210
         $grid_item_2 = $html;
211
-        $grid_pop_groups[]= array($grid_item_2);
211
+        $grid_pop_groups[] = array($grid_item_2);
212 212
     }
213 213
 }
214 214
 
@@ -222,61 +222,61 @@  discard block
 block discarded – undo
222 222
     switch ($view_group) {
223 223
         case 'mygroups':
224 224
             if (count($grid_my_groups) > 0) {
225
-                $my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
225
+                $my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true, false));
226 226
             }
227 227
             if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
228
-                $create_group_item =  '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
228
+                $create_group_item = '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
229 229
                     get_lang('CreateASocialGroup').'</a>';
230 230
             } else {
231
-                if (api_is_allowed_to_edit(null,true)) {
232
-                    $create_group_item =  '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
231
+                if (api_is_allowed_to_edit(null, true)) {
232
+                    $create_group_item = '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
233 233
                         get_lang('CreateASocialGroup').'</a>';
234 234
                 }
235 235
             }
236 236
             break;
237 237
         case 'newest':
238 238
             if (count($grid_newest_groups) > 0) {
239
-                $newest_content = Display::return_sortable_grid('newest', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));
239
+                $newest_content = Display::return_sortable_grid('newest', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true, false));
240 240
             }
241 241
             break;
242 242
         default:
243 243
             if (count($grid_pop_groups) > 0) {
244
-                $popular_content = Display::return_sortable_grid('popular', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true));
244
+                $popular_content = Display::return_sortable_grid('popular', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true, true, true));
245 245
             }
246 246
             break;
247 247
     }
248 248
 } else {
249 249
     $my_group_content = null;
250 250
     if (count($grid_my_groups) > 0) {
251
-        $my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
251
+        $my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true, false));
252 252
     } else {
253 253
         $my_group_content = '<span class="muted">'.get_lang('GroupNone').'</span>';
254 254
     }
255 255
     if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
256
-        $create_group_item =  '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
256
+        $create_group_item = '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.
257 257
             get_lang('CreateASocialGroup').'</a>';
258 258
     } else {
259
-        if (api_is_allowed_to_edit(null,true)) {
260
-            $create_group_item =  '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
259
+        if (api_is_allowed_to_edit(null, true)) {
260
+            $create_group_item = '<a class="btn btn-default" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
261 261
         }
262 262
     }
263 263
     if (count($grid_newest_groups) > 0) {
264
-        $newest_content = Display::return_sortable_grid('mygroups', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));
264
+        $newest_content = Display::return_sortable_grid('mygroups', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true, false));
265 265
     } else {
266 266
         $newest_content = '<span class="muted">'.get_lang('GroupNone').'</span>';
267 267
     }
268 268
     if (count($grid_pop_groups) > 0) {
269
-        $popular_content = Display::return_sortable_grid('mygroups', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true));
269
+        $popular_content = Display::return_sortable_grid('mygroups', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true, true, true));
270 270
     } else {
271 271
         $popular_content = '<span class="muted">'.get_lang('GroupNone').'</span>';
272 272
     }
273 273
 }
274 274
 
275 275
 if (!empty($create_group_item)) {
276
-    $social_right_content .=  Display::page_subheader($create_group_item);
276
+    $social_right_content .= Display::page_subheader($create_group_item);
277 277
 }
278 278
 $headers = array(get_lang('Newest'), get_lang('Popular'), get_lang('MyGroups'));
279
-$social_right_content .= Display::tabs($headers, array($newest_content, $popular_content, $my_group_content),'tab_browse');
279
+$social_right_content .= Display::tabs($headers, array($newest_content, $popular_content, $my_group_content), 'tab_browse');
280 280
 
281 281
 $show_message = null;
282 282
 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'show_message' && isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'topic_deleted') {
Please login to merge, or discard this patch.
main/social/group_members.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $group_id
118 118
 );
119 119
 $social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
120
-$social_right_content = '<h2>' . $group_info['name'] . '</h2>';
120
+$social_right_content = '<h2>'.$group_info['name'].'</h2>';
121 121
 
122 122
 foreach ($users as $user) {
123 123
     switch ($user['relation_type']) {
@@ -136,24 +136,24 @@  discard block
 block discarded – undo
136 136
                 )
137 137
             )
138 138
             ) {
139
-                $user['link'] = '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=delete">' .
139
+                $user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=delete">'.
140 140
                     Display::return_icon(
141 141
                         'delete.png',
142 142
                         get_lang('DeleteFromGroup')
143
-                    ) . '</a>' .
144
-                    '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=set_moderator">' .
143
+                    ).'</a>'.
144
+                    '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=set_moderator">'.
145 145
                     Display::return_icon(
146 146
                         'social_moderator_add.png',
147 147
                         get_lang('AddModerator')
148
-                    ) . '</a>';
148
+                    ).'</a>';
149 149
             }
150 150
             break;
151 151
         case GROUP_USER_PERMISSION_PENDING_INVITATION:
152
-            $user['link'] = '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=add">' .
152
+            $user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=add">'.
153 153
                 Display::return_icon(
154 154
                     'pending_invitation.png',
155 155
                     get_lang('PendingInvitation')
156
-                ) . '</a>';
156
+                ).'</a>';
157 157
             break;
158 158
         case GROUP_USER_PERMISSION_MODERATOR:
159 159
             $user['link'] = Display::return_icon(
@@ -162,17 +162,17 @@  discard block
 block discarded – undo
162 162
             );
163 163
             //only group admin can manage moderators
164 164
             if ($user_role == GROUP_USER_PERMISSION_ADMIN) {
165
-                $user['link'] .= '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=delete_moderator">'.
165
+                $user['link'] .= '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=delete_moderator">'.
166 166
                     Display::return_icon(
167 167
                         'social_moderator_delete.png',
168 168
                         get_lang('DeleteModerator')
169
-                    ) . '</a>';
169
+                    ).'</a>';
170 170
             }
171 171
             break;
172 172
     }
173 173
 
174 174
     $userPicture = UserManager::getUserPicture($user['id']);
175
-    $user['image'] = '<img src="' . $userPicture . '"  width="50px" height="50px"  />';
175
+    $user['image'] = '<img src="'.$userPicture.'"  width="50px" height="50px"  />';
176 176
     $new_member_list[] = $user;
177 177
 }
178 178
 if (count($new_member_list) > 0) {
Please login to merge, or discard this patch.