Completed
Pull Request — release-2.1 (#5615)
by Mathias
25:26 queued 06:24
created
Sources/Subs-Attachments.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 	if (!isset($attached[$msgID]))
1148 1148
 	{
1149 1149
 		if (empty($cacheMsgID[$msgID]))
1150
-			prepareAttachsByMsg ([$msgID]);
1150
+			prepareAttachsByMsg([$msgID]);
1151 1151
 /*
1152 1152
 		$request = $smcFunc['db_query']('', '
1153 1153
 			SELECT
@@ -1375,11 +1375,11 @@  discard block
 block discarded – undo
1375 1375
 function prepareAttachsByMsg($msgIDs)
1376 1376
 {
1377 1377
 	global $context, $modSettings, $smcFunc, $user_info, $cacheMsgID;
1378
-	if(!isset($cacheMsgID))
1378
+	if (!isset($cacheMsgID))
1379 1379
 		$cacheMsgID = [];
1380 1380
 	
1381 1381
 	// remove all $msgIDs which we already cached
1382
-	$msgIDs = array_flip(array_diff_key(array_flip($msgIDs), $cacheMsgID)) ;
1382
+	$msgIDs = array_flip(array_diff_key(array_flip($msgIDs), $cacheMsgID));
1383 1383
 
1384 1384
 	if (!empty($msgIDs))
1385 1385
 	{
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
 		
1405 1405
 		foreach ($rows as $value)
1406 1406
 		{
1407
-			if(empty($cacheMsgID[$value['id_msg']]))
1407
+			if (empty($cacheMsgID[$value['id_msg']]))
1408 1408
 				$cacheMsgID[$value['id_msg']] = [];
1409 1409
 			$cacheMsgID[$value['id_msg']][$value['id_attach']] = $value;
1410 1410
 		}
Please login to merge, or discard this patch.