Passed
Push — patch_1-1-9 ( d927f0...e2616d )
by Spuds
01:06 queued 27s
created
sources/subs/ScheduledTask/RemoveOldFollowups.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@  discard block
 block discarded – undo
30 30
 		global $modSettings;
31 31
 
32 32
 		if (empty($modSettings['enableFollowup']))
33
-			return false;
33
+		{
34
+					return false;
35
+		}
34 36
 
35 37
 		$db = database();
36 38
 
@@ -48,11 +50,15 @@  discard block
 block discarded – undo
48 50
 		);
49 51
 		$remove = array();
50 52
 		while ($row = $db->fetch_assoc($request))
51
-			$remove[] = $row['derived_from'];
53
+		{
54
+					$remove[] = $row['derived_from'];
55
+		}
52 56
 		$db->free_result($request);
53 57
 
54 58
 		if (empty($remove))
55
-			return true;
59
+		{
60
+					return true;
61
+		}
56 62
 
57 63
 		require_once(SUBSDIR . '/FollowUps.subs.php');
58 64
 		removeFollowUpsByMessage($remove);
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/RemoveTempAttachments.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
 					{
54 54
 						// Temp file is more than 5 hours old!
55 55
 						if ($file->getMTime() < time() - 18000)
56
-							@unlink($file->getPathname());
56
+						{
57
+													@unlink($file->getPathname());
58
+						}
57 59
 					}
58 60
 				}
59 61
 			}
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/UserAccessMentions.php 1 patch
Braces   +27 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@  discard block
 block discarded – undo
58 58
 			{
59 59
 				// Just to stay on the safe side...
60 60
 				if (empty($member))
61
-					continue;
61
+				{
62
+									continue;
63
+				}
62 64
 
63 65
 				$user_see_board = memberQuerySeeBoard($member);
64 66
 				$limit = 100;
@@ -97,9 +99,12 @@  discard block
 block discarded – undo
97 99
 						while ($row = $db->fetch_assoc($request))
98 100
 						{
99 101
 							if (empty($row['id_board']))
100
-								$remove[] = $row['id_mention'];
101
-							else
102
-								$mentions[] = $row['id_mention'];
102
+							{
103
+															$remove[] = $row['id_mention'];
104
+							}
105
+							else {
106
+															$mentions[] = $row['id_mention'];
107
+							}
103 108
 						}
104 109
 						$db->free_result($request);
105 110
 
@@ -110,10 +115,13 @@  discard block
 block discarded – undo
110 115
 
111 116
 						// If we found something toggle them and increment the start for the next round
112 117
 						if (!empty($mentions))
113
-							toggleMentionsAccessibility($mentions, $can == 'can');
118
+						{
119
+													toggleMentionsAccessibility($mentions, $can == 'can');
120
+						}
114 121
 						// Otherwise it means we have finished with this access level for this member
115
-						else
116
-							break;
122
+						else {
123
+													break;
124
+						}
117 125
 
118 126
 						// Next batch
119 127
 						$start += $limit;
@@ -135,7 +143,9 @@  discard block
 block discarded – undo
135 143
 
136 144
 			// If there are no more users, scheduleTaskImmediate can be stopped
137 145
 			if (empty($user_access_mentions))
138
-				removeScheduleTaskImmediate('user_access_mentions', false);
146
+			{
147
+							removeScheduleTaskImmediate('user_access_mentions', false);
148
+			}
139 149
 
140 150
 			return true;
141 151
 		}
@@ -164,7 +174,9 @@  discard block
 block discarded – undo
164 174
 			$db->free_result($request);
165 175
 
166 176
 			if ($remaining == 0)
167
-				$current_check = 0;
177
+			{
178
+							$current_check = 0;
179
+			}
168 180
 
169 181
 			// Grab users with mentions
170 182
 			$request = $db->query('', '
@@ -212,9 +224,12 @@  discard block
 block discarded – undo
212 224
 				if ($db->num_rows($request2) == 1)
213 225
 				{
214 226
 					if (!empty($modSettings['user_access_mentions']))
215
-						$modSettings['user_access_mentions'] = \Util::unserialize($modSettings['user_access_mentions']);
216
-					else
217
-						$modSettings['user_access_mentions'] = array();
227
+					{
228
+											$modSettings['user_access_mentions'] = \Util::unserialize($modSettings['user_access_mentions']);
229
+					}
230
+					else {
231
+											$modSettings['user_access_mentions'] = array();
232
+					}
218 233
 
219 234
 					// But if the member is already on the list, let's skip it
220 235
 					if (!isset($modSettings['user_access_mentions'][$row['id_member']]))
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/ApprovalNotification.php 1 patch
Braces   +51 added lines, -18 removed lines patch added patch discarded remove patch
@@ -58,15 +58,22 @@  discard block
 block discarded – undo
58 58
 		{
59 59
 			// If this is no longer around we'll ignore it.
60 60
 			if (empty($row['id_topic']))
61
-				continue;
61
+			{
62
+							continue;
63
+			}
62 64
 
63 65
 			// What type is it?
64 66
 			if ($row['id_first_msg'] && $row['id_first_msg'] == $row['id_msg'])
65
-				$type = 'topic';
67
+			{
68
+							$type = 'topic';
69
+			}
66 70
 			elseif ($row['id_attach'])
67
-				$type = 'attach';
68
-			else
69
-				$type = 'msg';
71
+			{
72
+							$type = 'attach';
73
+			}
74
+			else {
75
+							$type = 'msg';
76
+			}
70 77
 
71 78
 			// Add it to the array otherwise.
72 79
 			$notices[$row['id_board']][$type][] = array(
@@ -88,7 +95,9 @@  discard block
 block discarded – undo
88 95
 
89 96
 		// If nothing quit now.
90 97
 		if (empty($notices))
91
-			return true;
98
+		{
99
+					return true;
100
+		}
92 101
 
93 102
 		// Now we need to think about finding out *who* can approve - this is hard!
94 103
 		// First off, get all the groups with this permission and sort by board.
@@ -109,13 +118,17 @@  discard block
 block discarded – undo
109 118
 		{
110 119
 			// Sorry guys, but we have to ignore guests AND members - it would be too many otherwise.
111 120
 			if ($row['id_group'] < 2)
112
-				continue;
121
+			{
122
+							continue;
123
+			}
113 124
 
114 125
 			$perms[$row['id_profile']][$row['add_deny'] ? 'add' : 'deny'][] = $row['id_group'];
115 126
 
116 127
 			// Anyone who can access has to be considered.
117 128
 			if ($row['add_deny'])
118
-				$addGroups[] = $row['id_group'];
129
+			{
130
+							$addGroups[] = $row['id_group'];
131
+			}
119 132
 		}
120 133
 		$db->free_result($request);
121 134
 
@@ -130,8 +143,10 @@  discard block
 block discarded – undo
130 143
 			// Make sure they get included in the big loop.
131 144
 			$members = array_keys($all_mods);
132 145
 			foreach ($all_mods as $rows)
133
-				foreach ($rows as $row)
146
+			{
147
+							foreach ($rows as $row)
134 148
 					$mods[$row['id_member']][$row['id_board']] = true;
149
+			}
135 150
 		}
136 151
 
137 152
 		// Come along one and all... until we reject you ;)
@@ -157,7 +172,9 @@  discard block
 block discarded – undo
157 172
 			{
158 173
 				list (,, $pref_binary) = explode('|', $row['mod_prefs']);
159 174
 				if (!($pref_binary & 4))
160
-					continue;
175
+				{
176
+									continue;
177
+				}
161 178
 			}
162 179
 
163 180
 			$members[$row['id_member']] = array(
@@ -185,7 +202,9 @@  discard block
 block discarded – undo
185 202
 
186 203
 			// Load the language file as required.
187 204
 			if (empty($current_language) || $current_language != $member['language'])
188
-				$current_language = loadLanguage('EmailTemplates', $member['language'], false);
205
+			{
206
+							$current_language = loadLanguage('EmailTemplates', $member['language'], false);
207
+			}
189 208
 
190 209
 			// Loop through each notice...
191 210
 			foreach ($notices as $board => $notice)
@@ -194,28 +213,38 @@  discard block
 block discarded – undo
194 213
 
195 214
 				// Can they mod in this board?
196 215
 				if (isset($mods[$id][$board]))
197
-					$access = true;
216
+				{
217
+									$access = true;
218
+				}
198 219
 
199 220
 				// Do the group check...
200 221
 				if (!$access && isset($perms[$profiles[$board]]['add']))
201 222
 				{
202 223
 					// They can access?!
203 224
 					if (array_intersect($perms[$profiles[$board]]['add'], $member['groups']))
204
-						$access = true;
225
+					{
226
+											$access = true;
227
+					}
205 228
 
206 229
 					// If they have deny rights don't consider them!
207 230
 					if (isset($perms[$profiles[$board]]['deny']))
208
-						if (array_intersect($perms[$profiles[$board]]['deny'], $member['groups']))
231
+					{
232
+											if (array_intersect($perms[$profiles[$board]]['deny'], $member['groups']))
209 233
 							$access = false;
234
+					}
210 235
 				}
211 236
 
212 237
 				// Finally, fix it for admins!
213 238
 				if (in_array(1, $member['groups']))
214
-					$access = true;
239
+				{
240
+									$access = true;
241
+				}
215 242
 
216 243
 				// If they can't access it then give it a break!
217 244
 				if (!$access)
218
-					continue;
245
+				{
246
+									continue;
247
+				}
219 248
 
220 249
 				foreach ($notice as $type => $items)
221 250
 				{
@@ -224,14 +253,18 @@  discard block
 block discarded – undo
224 253
 						'------------------------------------------------------' . "\n";
225 254
 
226 255
 					foreach ($items as $item)
227
-						$emailbody .= $item['subject'] . ' - ' . $item['href'] . "\n";
256
+					{
257
+											$emailbody .= $item['subject'] . ' - ' . $item['href'] . "\n";
258
+					}
228 259
 
229 260
 					$emailbody .= "\n";
230 261
 				}
231 262
 			}
232 263
 
233 264
 			if ($emailbody == '')
234
-				continue;
265
+			{
266
+							continue;
267
+			}
235 268
 
236 269
 			$replacements = array(
237 270
 				'REALNAME' => $member['name'],
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/DailyMaintenance.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@  discard block
 block discarded – undo
62 62
 			);
63 63
 			$members = array();
64 64
 			while ($row = $db->fetch_assoc($request))
65
-				$members[$row['id_member']] = $row['warning'];
65
+			{
66
+							$members[$row['id_member']] = $row['warning'];
67
+			}
66 68
 			$db->free_result($request);
67 69
 
68 70
 			// Have some members to check?
@@ -85,10 +87,12 @@  discard block
 block discarded – undo
85 87
 				{
86 88
 					// More than 24 hours ago?
87 89
 					if ($row['last_warning'] <= time() - 86400)
88
-						$member_changes[] = array(
90
+					{
91
+											$member_changes[] = array(
89 92
 							'id' => $row['id_recipient'],
90 93
 							'warning' => $members[$row['id_recipient']] >= $modSettings['warning_decrement'] ? $members[$row['id_recipient']] - $modSettings['warning_decrement'] : 0,
91 94
 						);
95
+					}
92 96
 				}
93 97
 				$db->free_result($request);
94 98
 
@@ -97,7 +101,9 @@  discard block
 block discarded – undo
97 101
 				{
98 102
 					require_once(SUBSDIR . '/Members.subs.php');
99 103
 					foreach ($member_changes as $change)
100
-						updateMemberData($change['id'], array('warning' => $change['warning']));
104
+					{
105
+											updateMemberData($change['id'], array('warning' => $change['warning']));
106
+					}
101 107
 				}
102 108
 			}
103 109
 		}
@@ -118,7 +124,9 @@  discard block
 block discarded – undo
118 124
 			$openID->setup_DH(true);
119 125
 		}
120 126
 		elseif (!empty($modSettings['dh_keys']))
121
-			removeSettings('dh_keys');
127
+		{
128
+					removeSettings('dh_keys');
129
+		}
122 130
 
123 131
 		// Clean up some old login history information.
124 132
 		$db->query('', '
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/Birthdayemails.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,9 @@
 block discarded – undo
71 71
 		while ($row = $db->fetch_assoc($result))
72 72
 		{
73 73
 			if (!isset($birthdays[$row['lngfile']]))
74
-				$birthdays[$row['lngfile']] = array();
74
+			{
75
+							$birthdays[$row['lngfile']] = array();
76
+			}
75 77
 			$birthdays[$row['lngfile']][$row['id_member']] = array(
76 78
 				'name' => $row['real_name'],
77 79
 				'email' => $row['email_address']
Please login to merge, or discard this patch.
sources/subs/ScheduledTask/WeeklyMaintenance.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,9 @@  discard block
 block discarded – undo
71 71
 		if (!empty($modSettings['pruningOptions']))
72 72
 		{
73 73
 			if (!empty($modSettings['pruningOptions']) && strpos($modSettings['pruningOptions'], ',') !== false)
74
-				list ($modSettings['pruneErrorLog'], $modSettings['pruneModLog'], $modSettings['pruneBanLog'], $modSettings['pruneReportLog'], $modSettings['pruneScheduledTaskLog'], $modSettings['pruneSpiderHitLog']) = explode(',', $modSettings['pruningOptions']);
74
+			{
75
+							list ($modSettings['pruneErrorLog'], $modSettings['pruneModLog'], $modSettings['pruneBanLog'], $modSettings['pruneReportLog'], $modSettings['pruneScheduledTaskLog'], $modSettings['pruneSpiderHitLog']) = explode(',', $modSettings['pruningOptions']);
76
+			}
75 77
 
76 78
 			if (!empty($modSettings['pruneErrorLog']))
77 79
 			{
@@ -149,7 +151,9 @@  discard block
 block discarded – undo
149 151
 					)
150 152
 				);
151 153
 				while ($row = $db->fetch_row($result))
152
-					$reports[] = $row[0];
154
+				{
155
+									$reports[] = $row[0];
156
+				}
153 157
 				$db->free_result($result);
154 158
 
155 159
 				if (!empty($reports))
Please login to merge, or discard this patch.
sources/subs/BBC/HtmlParser.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,8 +174,9 @@
 block discarded – undo
174 174
 					// Set the new image tag.
175 175
 					$replaces[$matches[0][$match]] = '[img width=' . $width . ' height=' . $height . $alt . ']' . $imgtag . '[/img]';
176 176
 				}
177
-				else
178
-					$replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]';
177
+				else {
178
+									$replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]';
179
+				}
179 180
 			}
180 181
 
181 182
 			$data = strtr($data, $replaces);
Please login to merge, or discard this patch.
sources/subs/Membergroups.subs.php 2 patches
Braces   +253 added lines, -98 removed lines patch added patch discarded remove patch
@@ -36,14 +36,18 @@  discard block
 block discarded – undo
36 36
 
37 37
 	// Make sure it's an array.
38 38
 	if (!is_array($groups))
39
-		$groups = array((int) $groups);
39
+	{
40
+			$groups = array((int) $groups);
41
+	}
40 42
 	else
41 43
 	{
42 44
 		$groups = array_unique($groups);
43 45
 
44 46
 		// Make sure all groups are integer.
45 47
 		foreach ($groups as $key => $value)
46
-			$groups[$key] = (int) $value;
48
+		{
49
+					$groups[$key] = (int) $value;
50
+		}
47 51
 	}
48 52
 
49 53
 	// Some groups are protected (guests, administrators, moderators, newbies).
@@ -61,19 +65,25 @@  discard block
 block discarded – undo
61 65
 			)
62 66
 		);
63 67
 		while ($row = $db->fetch_assoc($request))
64
-			$protected_groups[] = $row['id_group'];
68
+		{
69
+					$protected_groups[] = $row['id_group'];
70
+		}
65 71
 		$db->free_result($request);
66 72
 	}
67 73
 
68 74
 	// Make sure they don't delete protected groups!
69 75
 	$groups = array_diff($groups, array_unique($protected_groups));
70 76
 	if (empty($groups))
71
-		return false;
77
+	{
78
+			return false;
79
+	}
72 80
 
73 81
 	// Log the deletion.
74 82
 	$groups_to_log = membergroupsById($groups, 0);
75 83
 	foreach ($groups_to_log as $key => $row)
76
-		logAction('delete_group', array('group' => $row['group_name']), 'admin');
84
+	{
85
+			logAction('delete_group', array('group' => $row['group_name']), 'admin');
86
+	}
77 87
 
78 88
 	call_integration_hook('integrate_delete_membergroups', array($groups));
79 89
 
@@ -153,12 +163,16 @@  discard block
 block discarded – undo
153 163
 	// Update each member information.
154 164
 	$updates = array();
155 165
 	while ($row = $db->fetch_assoc($request))
156
-		$updates[$row['additional_groups']][] = $row['id_member'];
166
+	{
167
+			$updates[$row['additional_groups']][] = $row['id_member'];
168
+	}
157 169
 	$db->free_result($request);
158 170
 
159 171
 	require_once(SUBSDIR . '/Members.subs.php');
160 172
 	foreach ($updates as $additional_groups => $memberArray)
161
-		updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), $groups))));
173
+	{
174
+			updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), $groups))));
175
+	}
162 176
 
163 177
 	// No boards can provide access to these membergroups anymore.
164 178
 	$request = $db->query('', '
@@ -171,11 +185,14 @@  discard block
 block discarded – undo
171 185
 	);
172 186
 	$updates = array();
173 187
 	while ($row = $db->fetch_assoc($request))
174
-		$updates[$row['member_groups']][] = $row['id_board'];
188
+	{
189
+			$updates[$row['member_groups']][] = $row['id_board'];
190
+	}
175 191
 	$db->free_result($request);
176 192
 
177 193
 	foreach ($updates as $member_groups => $boardArray)
178
-		$db->query('', '
194
+	{
195
+			$db->query('', '
179 196
 			UPDATE {db_prefix}boards
180 197
 			SET member_groups = {string:member_groups}
181 198
 			WHERE id_board IN ({array_int:board_lists})',
@@ -184,6 +201,7 @@  discard block
 block discarded – undo
184 201
 				'member_groups' => implode(',', array_diff(explode(',', $member_groups), $groups)),
185 202
 			)
186 203
 		);
204
+	}
187 205
 
188 206
 	// Recalculate the post groups, as they likely changed.
189 207
 	updatePostGroupStats();
@@ -195,7 +213,9 @@  discard block
 block discarded – undo
195 213
 	// @memo we are lucky that the group 1 and 0 cannot be deleted
196 214
 	// $modSettings['spider_group'] is set to 1 (admin) for regular members (that usually is group 0)
197 215
 	if (isset($modSettings['spider_group']) && in_array($modSettings['spider_group'], $groups))
198
-		$settings_update['spider_group'] = 0;
216
+	{
217
+			$settings_update['spider_group'] = 0;
218
+	}
199 219
 
200 220
 	updateSettings($settings_update);
201 221
 
@@ -226,21 +246,27 @@  discard block
 block discarded – undo
226 246
 
227 247
 	// You're getting nowhere without this permission, unless of course you are the group's moderator.
228 248
 	if (!$permissionCheckDone)
229
-		isAllowedTo('manage_membergroups');
249
+	{
250
+			isAllowedTo('manage_membergroups');
251
+	}
230 252
 
231 253
 	// Assume something will happen.
232 254
 	updateSettings(array('settings_updated' => time()));
233 255
 
234 256
 	// Cleaning the input.
235 257
 	if (!is_array($members))
236
-		$members = array((int) $members);
258
+	{
259
+			$members = array((int) $members);
260
+	}
237 261
 	else
238 262
 	{
239 263
 		$members = array_unique($members);
240 264
 
241 265
 		// Cast the members to integer.
242 266
 		foreach ($members as $key => $value)
243
-			$members[$key] = (int) $value;
267
+		{
268
+					$members[$key] = (int) $value;
269
+		}
244 270
 	}
245 271
 
246 272
 	// Before we get started, let's check we won't leave the admin group empty!
@@ -253,12 +279,16 @@  discard block
 block discarded – undo
253 279
 		$non_changing_admins = array_diff(array_keys($admins), $members);
254 280
 
255 281
 		if (empty($non_changing_admins))
256
-			$members = array_diff($members, array_keys($admins));
282
+		{
283
+					$members = array_diff($members, array_keys($admins));
284
+		}
257 285
 	}
258 286
 
259 287
 	// Just in case.
260 288
 	if (empty($members))
261
-		return false;
289
+	{
290
+			return false;
291
+	}
262 292
 
263 293
 	// Wanna remove all groups from these members? That's easy.
264 294
 	if ($groups === null)
@@ -283,15 +313,20 @@  discard block
 block discarded – undo
283 313
 
284 314
 		// Log what just happened.
285 315
 		foreach ($members as $member)
286
-			logAction('removed_all_groups', array('member' => $member), 'admin');
316
+		{
317
+					logAction('removed_all_groups', array('member' => $member), 'admin');
318
+		}
287 319
 
288 320
 		return true;
289 321
 	}
290 322
 	elseif (!is_array($groups))
291
-		$groups = array((int) $groups);
323
+	{
324
+			$groups = array((int) $groups);
325
+	}
292 326
 	// Make sure all groups are integer.
293
-	else
294
-		$groups = array_unique(array_map('intval', $groups));
327
+	else {
328
+			$groups = array_unique(array_map('intval', $groups));
329
+	}
295 330
 
296 331
 	// Fetch a list of groups members cannot be assigned to explicitly, and the group names of the ones we want.
297 332
 	$implicitGroups = array(-1, 0, 3);
@@ -300,9 +335,12 @@  discard block
 block discarded – undo
300 335
 	foreach ($group_details as $key => $row)
301 336
 	{
302 337
 		if ($row['min_posts'] != -1)
303
-			$implicitGroups[] = $row['id_group'];
304
-		else
305
-			$group_names[$row['id_group']] = $row['group_name'];
338
+		{
339
+					$implicitGroups[] = $row['id_group'];
340
+		}
341
+		else {
342
+					$group_names[$row['id_group']] = $row['group_name'];
343
+		}
306 344
 	}
307 345
 
308 346
 	// Now get rid of those groups.
@@ -321,7 +359,9 @@  discard block
 block discarded – undo
321 359
 		);
322 360
 		$protected_groups = array(1);
323 361
 		while ($row = $db->fetch_assoc($request))
324
-			$protected_groups[] = $row['id_group'];
362
+		{
363
+					$protected_groups[] = $row['id_group'];
364
+		}
325 365
 		$db->free_result($request);
326 366
 
327 367
 		// If you're not an admin yourself, you can't touch protected groups!
@@ -330,7 +370,9 @@  discard block
 block discarded – undo
330 370
 
331 371
 	// Only continue if there are still groups and members left.
332 372
 	if (empty($groups) || empty($members))
333
-		return false;
373
+	{
374
+			return false;
375
+	}
334 376
 
335 377
 	// First, reset those who have this as their primary group - this is the easy one.
336 378
 	$log_inserts = $db->fetchQueryCallback('
@@ -377,8 +419,10 @@  discard block
 block discarded – undo
377 419
 	{
378 420
 		// What log entries must we make for this one, eh?
379 421
 		foreach (explode(',', $row['additional_groups']) as $group)
380
-			if (in_array($group, $groups))
422
+		{
423
+					if (in_array($group, $groups))
381 424
 				$log_inserts[] = array('group' => $group_names[$group], 'member' => $row['id_member']);
425
+		}
382 426
 
383 427
 		$updates[$row['additional_groups']][] = $row['id_member'];
384 428
 	}
@@ -386,15 +430,19 @@  discard block
 block discarded – undo
386 430
 
387 431
 	require_once(SUBSDIR . '/Members.subs.php');
388 432
 	foreach ($updates as $additional_groups => $memberArray)
389
-		updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), $groups))));
433
+	{
434
+			updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), $groups))));
435
+	}
390 436
 
391 437
 	// Their post groups may have changed now...
392 438
 	updatePostGroupStats($members);
393 439
 
394 440
 	// Do the log.
395 441
 	if (!empty($log_inserts) && !empty($modSettings['modlog_enabled']))
396
-		foreach ($log_inserts as $extra)
442
+	{
443
+			foreach ($log_inserts as $extra)
397 444
 			logAction('removed_from_group', $extra, 'admin');
445
+	}
398 446
 
399 447
 	// Mission successful.
400 448
 	return true;
@@ -431,16 +479,21 @@  discard block
 block discarded – undo
431 479
 
432 480
 	// Show your licence, but only if it hasn't been done yet.
433 481
 	if (!$permissionCheckDone)
434
-		isAllowedTo('manage_membergroups');
482
+	{
483
+			isAllowedTo('manage_membergroups');
484
+	}
435 485
 
436 486
 	// Make sure we don't keep old stuff cached.
437 487
 	updateSettings(array('settings_updated' => time()));
438 488
 
439 489
 	if (!is_array($members))
440
-		$members = array((int) $members);
490
+	{
491
+			$members = array((int) $members);
492
+	}
441 493
 	// Make sure all members are integer.
442
-	else
443
-		$members = array_unique(array_map('intval', $members));
494
+	else {
495
+			$members = array_unique(array_map('intval', $members));
496
+	}
444 497
 
445 498
 	$group = (int) $group;
446 499
 
@@ -449,24 +502,34 @@  discard block
 block discarded – undo
449 502
 	$group_names = array();
450 503
 	$group_details = membergroupById($group, true);
451 504
 	if ($group_details['min_posts'] != -1)
452
-		$implicitGroups[] = $group_details['id_group'];
453
-	else
454
-		$group_names[$group_details['id_group']] = $group_details['group_name'];
505
+	{
506
+			$implicitGroups[] = $group_details['id_group'];
507
+	}
508
+	else {
509
+			$group_names[$group_details['id_group']] = $group_details['group_name'];
510
+	}
455 511
 
456 512
 	// Sorry, you can't join an implicit group.
457 513
 	if (in_array($group, $implicitGroups) || empty($members))
458
-		return false;
514
+	{
515
+			return false;
516
+	}
459 517
 
460 518
 	// Only admins can add admins...
461 519
 	if (!allowedTo('admin_forum') && $group == 1)
462
-		return false;
520
+	{
521
+			return false;
522
+	}
463 523
 	// ... and assign protected groups!
464 524
 	elseif (!allowedTo('admin_forum') && $group_details['group_type'] == 1)
465
-		return false;
525
+	{
526
+			return false;
527
+	}
466 528
 
467 529
 	// Do the actual updates.
468 530
 	if ($type == 'only_additional')
469
-		$db->query('', '
531
+	{
532
+			$db->query('', '
470 533
 			UPDATE {db_prefix}members
471 534
 			SET additional_groups = CASE WHEN additional_groups = {string:blank_string} THEN {string:id_group_string} ELSE CONCAT(additional_groups, {string:id_group_string_extend}) END
472 535
 			WHERE id_member IN ({array_int:member_list})
@@ -480,8 +543,10 @@  discard block
 block discarded – undo
480 543
 				'blank_string' => '',
481 544
 			)
482 545
 		);
546
+	}
483 547
 	elseif ($type == 'only_primary' || $type == 'force_primary')
484
-		$db->query('', '
548
+	{
549
+			$db->query('', '
485 550
 			UPDATE {db_prefix}members
486 551
 			SET id_group = {int:id_group}
487 552
 			WHERE id_member IN ({array_int:member_list})' . ($type == 'force_primary' ? '' : '
@@ -493,8 +558,10 @@  discard block
 block discarded – undo
493 558
 				'regular_group' => 0,
494 559
 			)
495 560
 		);
561
+	}
496 562
 	elseif ($type == 'auto')
497
-		$db->query('', '
563
+	{
564
+			$db->query('', '
498 565
 			UPDATE {db_prefix}members
499 566
 			SET
500 567
 				id_group = CASE WHEN id_group = {int:regular_group} THEN {int:id_group} ELSE id_group END,
@@ -513,9 +580,11 @@  discard block
 block discarded – undo
513 580
 				'id_group_string_extend' => ',' . $group,
514 581
 			)
515 582
 		);
583
+	}
516 584
 	// Ack!!?  What happened?
517
-	else
518
-		trigger_error('addMembersToGroup(): Unknown type \'' . $type . '\'', E_USER_WARNING);
585
+	else {
586
+			trigger_error('addMembersToGroup(): Unknown type \'' . $type . '\'', E_USER_WARNING);
587
+	}
519 588
 
520 589
 	call_integration_hook('integrate_add_members_to_group', array($members, $group_details, &$group_names));
521 590
 
@@ -524,7 +593,9 @@  discard block
 block discarded – undo
524 593
 
525 594
 	require_once(SOURCEDIR . '/Logging.php');
526 595
 	foreach ($members as $member)
527
-		logAction('added_to_group', array('group' => $group_names[$group], 'member' => $member), 'admin');
596
+	{
597
+			logAction('added_to_group', array('group' => $group_names[$group], 'member' => $member), 'admin');
598
+	}
528 599
 
529 600
 	return true;
530 601
 }
@@ -557,7 +628,9 @@  discard block
 block discarded – undo
557 628
 	);
558 629
 	$members = array();
559 630
 	while ($row = $db->fetch_assoc($request))
560
-		$members[$row['id_member']] = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
631
+	{
632
+			$members[$row['id_member']] = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
633
+	}
561 634
 	$db->free_result($request);
562 635
 
563 636
 	// If there are more than $limit members, add a 'more' link.
@@ -566,9 +639,10 @@  discard block
 block discarded – undo
566 639
 		array_pop($members);
567 640
 		return true;
568 641
 	}
569
-	else
570
-		return false;
571
-}
642
+	else {
643
+			return false;
644
+	}
645
+	}
572 646
 
573 647
 /**
574 648
  * Retrieve a list of (visible) membergroups used by the cache.
@@ -697,16 +771,22 @@  discard block
 block discarded – undo
697 771
 	{
698 772
 		// We only list the groups they can see.
699 773
 		if ($row['hidden'] && !$row['can_moderate'] && !$include_hidden)
700
-			continue;
774
+		{
775
+					continue;
776
+		}
701 777
 
702 778
 		if ($row['id_parent'] != -2)
703
-			$parent_groups[] = $row['id_parent'];
779
+		{
780
+					$parent_groups[] = $row['id_parent'];
781
+		}
704 782
 
705 783
 		// If it's inherited, just add it as a child.
706 784
 		if ($aggregate && $row['id_parent'] != -2)
707 785
 		{
708 786
 			if (isset($groups[$row['id_parent']]))
709
-				$groups[$row['id_parent']]['children'][$row['id_group']] = $row['group_name'];
787
+			{
788
+							$groups[$row['id_parent']]['children'][$row['id_group']] = $row['group_name'];
789
+			}
710 790
 			continue;
711 791
 		}
712 792
 
@@ -728,10 +808,12 @@  discard block
 block discarded – undo
728 808
 		);
729 809
 
730 810
 		if ($count_permissions)
731
-			$groups[$row['id_group']]['num_permissions'] = array(
811
+		{
812
+					$groups[$row['id_group']]['num_permissions'] = array(
732 813
 				'allowed' => $row['id_group'] == 1 ? '(' . $txt['permissions_all'] . ')' : 0,
733 814
 				'denied' => $row['id_group'] == 1 ? '(' . $txt['permissions_none'] . ')' : 0,
734 815
 			);
816
+		}
735 817
 
736 818
 		$include_hidden |= $row['can_moderate'];
737 819
 		$group_ids[] = $row['id_group'];
@@ -742,13 +824,18 @@  discard block
 block discarded – undo
742 824
 	if (!empty($group_ids))
743 825
 	{
744 826
 		if ($membergroup_type === 'post_count')
745
-			$groups_count = membersInGroups($group_ids);
746
-		else
747
-			$groups_count = membersInGroups(array(), $group_ids, $include_hidden);
827
+		{
828
+					$groups_count = membersInGroups($group_ids);
829
+		}
830
+		else {
831
+					$groups_count = membersInGroups(array(), $group_ids, $include_hidden);
832
+		}
748 833
 
749 834
 		// @todo not sure why += wouldn't = be enough?
750 835
 		foreach ($groups_count as $group_id => $num_members)
751
-			$groups[$group_id]['num_members'] += $num_members;
836
+		{
837
+					$groups[$group_id]['num_members'] += $num_members;
838
+		}
752 839
 
753 840
 		$query = $db->query('', '
754 841
 			SELECT mods.id_group, mods.id_member, mem.member_name, mem.real_name
@@ -760,7 +847,9 @@  discard block
 block discarded – undo
760 847
 			)
761 848
 		);
762 849
 		while ($row = $db->fetch_assoc($query))
763
-			$groups[$row['id_group']]['moderators'][] = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
850
+		{
851
+					$groups[$row['id_group']]['moderators'][] = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
852
+		}
764 853
 		$db->free_result($query);
765 854
 	}
766 855
 
@@ -779,7 +868,9 @@  discard block
 block discarded – undo
779 868
 			)
780 869
 		);
781 870
 		while ($row = $db->fetch_assoc($request))
782
-			$all_group_names[$row['id_group']] = $row['group_name'];
871
+		{
872
+					$all_group_names[$row['id_group']] = $row['group_name'];
873
+		}
783 874
 	}
784 875
 	foreach ($groups as $key => $group)
785 876
 	{
@@ -796,7 +887,9 @@  discard block
 block discarded – undo
796 887
 		$sort_array = array();
797 888
 
798 889
 		foreach ($groups as $group)
799
-			$sort_array[] = $group['id_group'] != 3 ? (int) $group['num_members'] : -1;
890
+		{
891
+					$sort_array[] = $group['id_group'] != 3 ? (int) $group['num_members'] : -1;
892
+		}
800 893
 
801 894
 		array_multisort($sort_array, $sort_ascending ? SORT_ASC : SORT_DESC, SORT_REGULAR, $groups);
802 895
 	}
@@ -852,7 +945,9 @@  discard block
 block discarded – undo
852 945
 			)
853 946
 		);
854 947
 		while ($row = $db->fetch_assoc($query))
855
-			$groups[$row['id_group']] = $row['member_count'];
948
+		{
949
+					$groups[$row['id_group']] = $row['member_count'];
950
+		}
856 951
 		$db->free_result($query);
857 952
 	}
858 953
 
@@ -871,7 +966,9 @@  discard block
 block discarded – undo
871 966
 			)
872 967
 		);
873 968
 		while ($row = $db->fetch_assoc($query))
874
-			$groups[$row['id_group']] = $row['member_count'];
969
+		{
970
+					$groups[$row['id_group']] = $row['member_count'];
971
+		}
875 972
 		$db->free_result($query);
876 973
 
877 974
 		// Only do additional groups if we can moderate...
@@ -896,9 +993,12 @@  discard block
 block discarded – undo
896 993
 			while ($row = $db->fetch_assoc($query))
897 994
 			{
898 995
 				if (isset($groups[$row['id_group']]))
899
-					$groups[$row['id_group']] += $row['member_count'];
900
-				else
901
-					$groups[$row['id_group']] = $row['member_count'];
996
+				{
997
+									$groups[$row['id_group']] += $row['member_count'];
998
+				}
999
+				else {
1000
+									$groups[$row['id_group']] = $row['member_count'];
1001
+				}
902 1002
 			}
903 1003
 			$db->free_result($query);
904 1004
 		}
@@ -938,7 +1038,9 @@  discard block
 block discarded – undo
938 1038
 	$db = database();
939 1039
 
940 1040
 	if (empty($group_ids))
941
-		return false;
1041
+	{
1042
+			return false;
1043
+	}
942 1044
 
943 1045
 	$group_ids = !is_array($group_ids) ? array($group_ids) : $group_ids;
944 1046
 
@@ -961,7 +1063,9 @@  discard block
 block discarded – undo
961 1063
 	);
962 1064
 
963 1065
 	while ($row = $db->fetch_assoc($request))
964
-		$groups[$row['id_group']] = $row;
1066
+	{
1067
+			$groups[$row['id_group']] = $row;
1068
+	}
965 1069
 	$db->free_result($request);
966 1070
 
967 1071
 	return $groups;
@@ -980,10 +1084,13 @@  discard block
 block discarded – undo
980 1084
 	$groups = membergroupsById(array($group_id), 1, $detailed, $assignable);
981 1085
 
982 1086
 	if (isset($groups[$group_id]))
983
-		return $groups[$group_id];
984
-	else
985
-		return false;
986
-}
1087
+	{
1088
+			return $groups[$group_id];
1089
+	}
1090
+	else {
1091
+			return false;
1092
+	}
1093
+	}
987 1094
 
988 1095
 /**
989 1096
  * Gets basic membergroup data
@@ -1020,9 +1127,13 @@  discard block
 block discarded – undo
1020 1127
 
1021 1128
 	// No $includes parameters given? Let's set some default values
1022 1129
 	if (empty($includes))
1023
-		$includes = array('globalmod', 'member', 'postgroups');
1130
+	{
1131
+			$includes = array('globalmod', 'member', 'postgroups');
1132
+	}
1024 1133
 	elseif (!is_array($includes))
1025
-		$includes = array($includes);
1134
+	{
1135
+			$includes = array($includes);
1136
+	}
1026 1137
 
1027 1138
 	$groups = array();
1028 1139
 
@@ -1048,11 +1159,15 @@  discard block
 block discarded – undo
1048 1159
 
1049 1160
 	// Only the post based membergroups? We can safely overwrite the $where.
1050 1161
 	if (in_array('membergroups', $excludes))
1051
-		$where = ' AND min_posts != {int:min_posts}';
1162
+	{
1163
+			$where = ' AND min_posts != {int:min_posts}';
1164
+	}
1052 1165
 
1053 1166
 	// Simply all of them?
1054 1167
 	if (in_array('all', $includes))
1055
-		$where = '';
1168
+	{
1169
+			$where = '';
1170
+	}
1056 1171
 
1057 1172
 	$request = $db->query('', '
1058 1173
 		SELECT id_group, group_name, min_posts, online_color
@@ -1106,26 +1221,30 @@  discard block
 block discarded – undo
1106 1221
 			);
1107 1222
 
1108 1223
 			if ($row['min_posts'] == -1)
1109
-				$groups['membergroups'][] = array(
1224
+			{
1225
+							$groups['membergroups'][] = array(
1110 1226
 					'id' => $row['id_group'],
1111 1227
 					'name' => $row['group_name'],
1112 1228
 					'can_be_additional' => true,
1113 1229
 				);
1114
-			else
1115
-				$groups['postgroups'][] = array(
1230
+			}
1231
+			else {
1232
+							$groups['postgroups'][] = array(
1116 1233
 					'id' => $row['id_group'],
1117 1234
 					'name' => $row['group_name'],
1118 1235
 				);
1236
+			}
1119 1237
 		}
1120 1238
 	}
1121
-	else
1122
-		while ($row = $db->fetch_assoc($request))
1239
+	else {
1240
+			while ($row = $db->fetch_assoc($request))
1123 1241
 		{
1124 1242
 			$groups[] = array(
1125 1243
 				'id' => $row['id_group'],
1126 1244
 				'name' => $row['group_name'],
1127 1245
 				'online_color' => $row['online_color'],
1128 1246
 			);
1247
+	}
1129 1248
 		}
1130 1249
 
1131 1250
 	$db->free_result($request);
@@ -1285,18 +1404,22 @@  discard block
 block discarded – undo
1285 1404
 	while ($row = $db->fetch_assoc($request))
1286 1405
 	{
1287 1406
 		if (empty($illegal_permissions) || !in_array($row['permission'], $illegal_permissions))
1288
-			$inserts[] = array($id_group, $row['permission'], $row['add_deny']);
1407
+		{
1408
+					$inserts[] = array($id_group, $row['permission'], $row['add_deny']);
1409
+		}
1289 1410
 	}
1290 1411
 	$db->free_result($request);
1291 1412
 
1292 1413
 	if (!empty($inserts))
1293
-		$db->insert('insert',
1414
+	{
1415
+			$db->insert('insert',
1294 1416
 			'{db_prefix}permissions',
1295 1417
 			array('id_group' => 'int', 'permission' => 'string', 'add_deny' => 'int'),
1296 1418
 			$inserts,
1297 1419
 			array('id_group', 'permission')
1298 1420
 		);
1299
-}
1421
+	}
1422
+	}
1300 1423
 
1301 1424
 /**
1302 1425
  * Copies the board permissions from a given membergroup.
@@ -1430,7 +1553,9 @@  discard block
 block discarded – undo
1430 1553
 	}
1431 1554
 
1432 1555
 	if (empty($values))
1433
-		return;
1556
+	{
1557
+			return;
1558
+	}
1434 1559
 
1435 1560
 	$db->query('', '
1436 1561
 		UPDATE {db_prefix}membergroups
@@ -1540,12 +1665,16 @@  discard block
 block discarded – undo
1540 1665
 	);
1541 1666
 
1542 1667
 	while ($row = $db->fetch_assoc($request))
1543
-		$updates[$row['additional_groups']][] = $row['id_member'];
1668
+	{
1669
+			$updates[$row['additional_groups']][] = $row['id_member'];
1670
+	}
1544 1671
 	$db->free_result($request);
1545 1672
 
1546 1673
 	require_once(SUBSDIR . '/Members.subs.php');
1547 1674
 	foreach ($updates as $additional_groups => $memberArray)
1548
-		updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), array($id_group)))));
1675
+	{
1676
+			updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), array($id_group)))));
1677
+	}
1549 1678
 
1550 1679
 }
1551 1680
 
@@ -1572,12 +1701,16 @@  discard block
 block discarded – undo
1572 1701
 	);
1573 1702
 
1574 1703
 	while ($row = $db->fetch_assoc($request))
1575
-		$updates[$row['additional_groups']][] = $row['id_member'];
1704
+	{
1705
+			$updates[$row['additional_groups']][] = $row['id_member'];
1706
+	}
1576 1707
 	$db->free_result($request);
1577 1708
 
1578 1709
 	require_once(SUBSDIR . '/Members.subs.php');
1579 1710
 	foreach ($updates as $additional_groups => $memberArray)
1580
-		updateMemberData($memberArray, array('additional_groups' => implode(',', array_merge(explode(',', $additional_groups), array($id_group)))));
1711
+	{
1712
+			updateMemberData($memberArray, array('additional_groups' => implode(',', array_merge(explode(',', $additional_groups), array($id_group)))));
1713
+	}
1581 1714
 
1582 1715
 	$db->query('', '
1583 1716
 		UPDATE {db_prefix}members
@@ -1615,8 +1748,10 @@  discard block
 block discarded – undo
1615 1748
 
1616 1749
 	// Do we need to update the setting?
1617 1750
 	if ((empty($modSettings['show_group_membership']) && $have_joinable) || (!empty($modSettings['show_group_membership']) && !$have_joinable))
1618
-		updateSettings(array('show_group_membership' => $have_joinable ? 1 : 0));
1619
-}
1751
+	{
1752
+			updateSettings(array('show_group_membership' => $have_joinable ? 1 : 0));
1753
+	}
1754
+	}
1620 1755
 
1621 1756
 /**
1622 1757
  * Detaches group moderators from a deleted group.
@@ -1677,7 +1812,9 @@  discard block
 block discarded – undo
1677 1812
 
1678 1813
 	$mod_insert = array();
1679 1814
 		foreach ($group_moderators as $moderator)
1680
-			$mod_insert[] = array($id_group, $moderator);
1815
+		{
1816
+					$mod_insert[] = array($id_group, $moderator);
1817
+		}
1681 1818
 
1682 1819
 		$db->insert('insert',
1683 1820
 			'{db_prefix}group_moderators',
@@ -1710,7 +1847,9 @@  discard block
 block discarded – undo
1710 1847
 		)
1711 1848
 	);
1712 1849
 	while ($row = $db->fetch_assoc($request))
1713
-		$moderators[$row['id_member']] = $row['real_name'];
1850
+	{
1851
+			$moderators[$row['id_member']] = $row['real_name'];
1852
+	}
1714 1853
 	$db->free_result($request);
1715 1854
 
1716 1855
 	return $moderators;
@@ -1751,7 +1890,9 @@  discard block
 block discarded – undo
1751 1890
 	);
1752 1891
 
1753 1892
 	while ($row = $db->fetch_assoc($request))
1754
-		$inheritable_groups[$row['id_group']] = $row['group_name'];
1893
+	{
1894
+			$inheritable_groups[$row['id_group']] = $row['group_name'];
1895
+	}
1755 1896
 	$db->free_result($request);
1756 1897
 
1757 1898
 	return $inheritable_groups;
@@ -1820,7 +1961,9 @@  discard block
 block discarded – undo
1820 1961
 			);
1821 1962
 		}
1822 1963
 		elseif (isset($profile_groups[$row['id_parent']]))
1823
-			$profile_groups[$row['id_parent']]['children'][] = $row['group_name'];
1964
+		{
1965
+					$profile_groups[$row['id_parent']]['children'][] = $row['group_name'];
1966
+		}
1824 1967
 	}
1825 1968
 	$db->free_result($request);
1826 1969
 
@@ -1863,7 +2006,9 @@  discard block
 block discarded – undo
1863 2006
 	{
1864 2007
 		// Hide hidden groups!
1865 2008
 		if ($show_hidden && $row['hidden'] && !$row['can_moderate'])
1866
-			continue;
2009
+		{
2010
+					continue;
2011
+		}
1867 2012
 
1868 2013
 		$groups[$row['id_group']] = $row['group_name'];
1869 2014
 	}
@@ -1905,7 +2050,9 @@  discard block
 block discarded – undo
1905 2050
 	{
1906 2051
 		// Hide hidden groups!
1907 2052
 		if ($row['hidden'] && !$row['can_moderate'] && !allowedTo('manage_membergroups'))
1908
-			continue;
2053
+		{
2054
+					continue;
2055
+		}
1909 2056
 
1910 2057
 		$groups[$row['id_group']] = $row['group_name'];
1911 2058
 	}
@@ -2029,7 +2176,9 @@  discard block
 block discarded – undo
2029 2176
 
2030 2177
 	// Parameter two is the updated columns: we should check to see if we base groups off any of these.
2031 2178
 	if ($parameter2 !== null && !in_array('posts', $parameter2))
2032
-		return;
2179
+	{
2180
+			return;
2181
+	}
2033 2182
 
2034 2183
 	$postgroups = Cache::instance()->get('updatePostGroupStats', 360);
2035 2184
 	if ($postgroups === null || $members === null)
@@ -2045,7 +2194,9 @@  discard block
 block discarded – undo
2045 2194
 		);
2046 2195
 		$postgroups = array();
2047 2196
 		while ($row = $db->fetch_assoc($request))
2048
-			$postgroups[$row['id_group']] = $row['min_posts'];
2197
+		{
2198
+					$postgroups[$row['id_group']] = $row['min_posts'];
2199
+		}
2049 2200
 		$db->free_result($request);
2050 2201
 
2051 2202
 		// Sort them this way because if it's done with MySQL it causes a filesort :(.
@@ -2056,7 +2207,9 @@  discard block
 block discarded – undo
2056 2207
 
2057 2208
 	// Oh great, they've screwed their post groups.
2058 2209
 	if (empty($postgroups))
2059
-		return;
2210
+	{
2211
+			return;
2212
+	}
2060 2213
 
2061 2214
 	// Set all membergroups from most posts to least posts.
2062 2215
 	$conditions = '';
@@ -2149,7 +2302,9 @@  discard block
 block discarded – undo
2149 2302
 	{
2150 2303
 		// We should skip the administrator group if they don't have the admin_forum permission!
2151 2304
 		if ($row['id_group'] == 1 && !allowedTo('admin_forum'))
2152
-			continue;
2305
+		{
2306
+					continue;
2307
+		}
2153 2308
 
2154 2309
 		$member_groups[$row['id_group']] = array(
2155 2310
 			'id' => $row['id_group'],
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 			'group_list' => $groups,
343 343
 			'member_list' => $members,
344 344
 		),
345
-		function ($row) use ($group_names)
345
+		function($row) use ($group_names)
346 346
 		{
347 347
 			return array('group' => $group_names[$row['id_group']], 'member' => $row['id_member']);
348 348
 		}
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			'mod_group' => 3,
596 596
 			'blank_string' => '',
597 597
 		),
598
-		function ($row) use ($scripturl)
598
+		function($row) use ($scripturl)
599 599
 		{
600 600
 			return '<a href="' . $scripturl . '?action=groups;sa=members;group=' . $row['id_group'] . '" ' . ($row['online_color'] ? 'style="color: ' . $row['online_color'] . '"' : '') . '>' . $row['group_name'] . '</a>';
601 601
 		}
@@ -1316,7 +1316,7 @@  discard block
 block discarded – undo
1316 1316
 		array(
1317 1317
 			'copy_from' => $copy_from,
1318 1318
 		),
1319
-		function ($row) use ($id_group)
1319
+		function($row) use ($id_group)
1320 1320
 		{
1321 1321
 			return array($id_group, $row['id_profile'], $row['permission'], $row['add_deny']);
1322 1322
 		}
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 			'board_access_list' => $boards[$access_list],
1464 1464
 			'column' => $access_list == 'allow' ? 'member_groups' : 'deny_member_groups',
1465 1465
 		),
1466
-		function ($row) use ($id_group, $access_list, $db)
1466
+		function($row) use ($id_group, $access_list, $db)
1467 1467
 		{
1468 1468
 			$db->query('', '
1469 1469
 				UPDATE {db_prefix}boards
@@ -1657,7 +1657,7 @@  discard block
 block discarded – undo
1657 1657
 		array(
1658 1658
 			'moderators' => $moderators,
1659 1659
 		),
1660
-		function ($row)
1660
+		function($row)
1661 1661
 		{
1662 1662
 			return $row['id_member'];
1663 1663
 		}
@@ -1980,7 +1980,7 @@  discard block
 block discarded – undo
1980 1980
 		array_merge($where_parameters, array(
1981 1981
 			'sort' => $sort,
1982 1982
 		)),
1983
-		function ($row) use ($scripturl)
1983
+		function($row) use ($scripturl)
1984 1984
 		{
1985 1985
 			return array(
1986 1986
 				'id' => $row['id_request'],
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
 			'min_posts' => -1,
2101 2101
 			'is_protected' => 1,
2102 2102
 		),
2103
-		function ($row)
2103
+		function($row)
2104 2104
 		{
2105 2105
 			return $row['id_group'];
2106 2106
 		},
Please login to merge, or discard this patch.