Passed
Pull Request — release-2.1 (#6274)
by Mathias
05:20
created
Sources/MessageIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 		WHERE t.id_board = {int:current_board} '
331 331
 			. (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
332 332
 			AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' 
333
-			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). '
333
+			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . '
334 334
 		ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . '
335 335
 		LIMIT {int:maxindex}
336 336
 			OFFSET {int:start} ';
Please login to merge, or discard this patch.
Sources/Profile-View.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -695,7 +695,7 @@
 block discarded – undo
695 695
 				'icon' => 'move',
696 696
 			),
697 697
 			'quickmod' => array(
698
-    			'class' => 'inline_mod_check',
698
+				'class' => 'inline_mod_check',
699 699
 				'content' => '<input type="checkbox" name="mark[' . $id . ']" value="' . $id . '">',
700 700
 				'show' => $context['showCheckboxes']
701 701
 			)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			AND a.is_read = 0' : '') . (!empty($alertIDs) ? '
262 262
 			AND a.id_alert IN ({array_int:alertIDs})' : '') . '
263 263
 		ORDER BY id_alert DESC' . (!empty($limit) ? '
264
-		LIMIT {int:limit}' : '') . (!empty($offset) ?'
264
+		LIMIT {int:limit}' : '') . (!empty($offset) ? '
265 265
 		OFFSET {int:offset}' : ''),
266 266
 		array(
267 267
 			'id_member' => $memID,
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 	call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats));
360 360
 
361 361
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
362
-	$formats = array_map(function ($format) use ($scripturl) {
362
+	$formats = array_map(function($format) use ($scripturl) {
363 363
 		$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
364 364
 		$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
365 365
 
@@ -1166,20 +1166,20 @@  discard block
 block discarded – undo
1166 1166
 		$context['posts'][$key]['quickbuttons'] = array(
1167 1167
 			'reply' => array(
1168 1168
 				'label' => $txt['reply'],
1169
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1169
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1170 1170
 				'icon' => 'reply_button',
1171 1171
 				'show' => $post['can_reply']
1172 1172
 			),
1173 1173
 			'quote' => array(
1174 1174
 				'label' => $txt['quote_action'],
1175
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1175
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1176 1176
 				'icon' => 'quote',
1177 1177
 				'show' => $post['can_quote']
1178 1178
 			),
1179 1179
 			'remove' => array(
1180 1180
 				'label' => $txt['remove'],
1181
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1182
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'"',
1181
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1182
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '"',
1183 1183
 				'class' => 'you_sure',
1184 1184
 				'icon' => 'remove_button',
1185 1185
 				'show' => $post['can_delete']
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,8 @@
 block discarded – undo
359 359
 	call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats));
360 360
 
361 361
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
362
-	$formats = array_map(function ($format) use ($scripturl) {
362
+	$formats = array_map(function ($format) use ($scripturl)
363
+	{
363 364
 		$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
364 365
 		$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
365 366
 
Please login to merge, or discard this patch.
Themes/default/index.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -574,7 +574,7 @@
 block discarded – undo
574 574
 				$value['id'] = $key;
575 575
 
576 576
 			$button = '
577
-				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>';
577
+				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>';
578 578
 
579 579
 			if (!empty($value['sub_buttons']))
580 580
 			{
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1931,7 +1931,7 @@
 block discarded – undo
1931 1931
 				<div class="floatright smalltext righttext">
1932 1932
 					<div class="recipient_to">&#171;&nbsp;<strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '&nbsp;&#187;</div>';
1933 1933
 
1934
-			if(!empty($draft['recipients']['bcc']))
1934
+			if (!empty($draft['recipients']['bcc']))
1935 1935
 				echo'
1936 1936
 					<div class="pm_bbc">&#171;&nbsp;<strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '&nbsp;&#187;</div>';
1937 1937
 
Please login to merge, or discard this patch.
Sources/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1241,7 +1241,7 @@
 block discarded – undo
1241 1241
 	// File Upload.
1242 1242
 	if ($context['can_post_attachment'])
1243 1243
 	{
1244
-		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function ($val) use ($smcFunc)
1244
+		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function($val) use ($smcFunc)
1245 1245
 		{
1246 1246
 			return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : '';
1247 1247
 		}, explode(',', $context['allowed_extensions'])));
Please login to merge, or discard this patch.
Sources/Profile-Modify.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 						log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])]));
501 501
 
502 502
 						$context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set)
503
-							{
503
+						{
504 504
 								return $v != $set;
505 505
 							});
506 506
 					}
@@ -3467,7 +3467,6 @@  discard block
 block discarded – undo
3467 3467
 			}
3468 3468
 		}
3469 3469
 	}
3470
-
3471 3470
 	elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar)
3472 3471
 	{
3473 3472
 		if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar)
Please login to merge, or discard this patch.
Sources/Notify.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 				'{db_prefix}log_notify',
283 283
 				array('id_member' => 'int', 'id_topic' => 'int', 'id_board' => 'int'),
284 284
 				array($user_info['id'], $log['id_topic'], 0),
285
-				array('id_member','id_topic', 'id_board')
285
+				array('id_member', 'id_topic', 'id_board')
286 286
 			);
287 287
 		}
288 288
 		else
Please login to merge, or discard this patch.
cron.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
 {
311 311
 	/**
312 312
 	 * Constants for notification types.
313
-	*/
313
+	 */
314 314
 	const RECEIVE_NOTIFY_EMAIL = 0x02;
315 315
 	const RECEIVE_NOTIFY_ALERT = 0x01;
316 316
 
Please login to merge, or discard this patch.
Braces   -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,6 @@
 block discarded – undo
93 93
 	if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20)
94 94
 		obExit_cron();
95 95
 }
96
-
97 96
 else
98 97
 	$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
99 98
 
Please login to merge, or discard this patch.
Sources/tasks/CreatePost-Notify.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
 	/**
21 21
 	 * Constants for reply types.
22
-	*/
22
+	 */
23 23
 	const NOTIFY_TYPE_REPLY_AND_MODIFY = 1;
24 24
 	const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2;
25 25
 	const NOTIFY_TYPE_ONLY_REPLIES = 3;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	/**
29 29
 	 * Constants for frequencies.
30
-	*/
30
+	 */
31 31
 	const FREQUENCY_NOTHING = 0;
32 32
 	const FREQUENCY_EVERYTHING = 1;
33 33
 	const FREQUENCY_FIRST_UNREAD_MSG = 2;
Please login to merge, or discard this patch.
Braces   -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,6 @@
 block discarded – undo
266 266
 				$user_info = $real_user_info;
267 267
 				unset($real_user_info);
268 268
 			}
269
-
270 269
 			else
271 270
 				$user_info = null;
272 271
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		if ($type == 'edit')
119 119
 		{
120 120
 			// Filter out members who have already been notified about this post's topic
121
-			$unnotified = array_filter($watched, function ($member)
121
+			$unnotified = array_filter($watched, function($member)
122 122
 			{
123 123
 				return empty($member['sent']);
124 124
 			});
@@ -204,8 +204,7 @@  discard block
 block discarded – undo
204 204
 			if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($prefs[$member_id]))
205 205
 			{
206 206
 				$pref = !empty($prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ?
207
-					$prefs[$member_id]['topic_notify_' . $topicOptions['id']] :
208
-					(!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0);
207
+					$prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0);
209 208
 
210 209
 				$message_type = 'notification_' . $type;
211 210
 
@@ -224,8 +223,7 @@  discard block
 block discarded – undo
224 223
 			elseif ($type == 'topic')
225 224
 			{
226 225
 				$pref = !empty($prefs[$member_id]['board_notify_' . $topicOptions['board']]) ?
227
-					$prefs[$member_id]['board_notify_' . $topicOptions['board']] :
228
-					(!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0);
226
+					$prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0);
229 227
 
230 228
 				$content_type = 'board';
231 229
 
Please login to merge, or discard this patch.