Completed
Pull Request — release-2.1 (#5615)
by Mathias
07:44
created
Sources/Subs-Attachments.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
 	if (!isset($attached[$msgID]))
1147 1147
 	{
1148 1148
 		if (empty($cacheMsgID[$msgID]))
1149
-			prepareAttachsByMsg (array($msgID));
1149
+			prepareAttachsByMsg(array($msgID));
1150 1150
 
1151 1151
 		$temp = array();
1152 1152
 		$rows = $cacheMsgID[$msgID];
@@ -1358,11 +1358,11 @@  discard block
 block discarded – undo
1358 1358
 function prepareAttachsByMsg($msgIDs)
1359 1359
 {
1360 1360
 	global $context, $modSettings, $smcFunc, $user_info, $cacheMsgID;
1361
-	if(!isset($cacheMsgID))
1361
+	if (!isset($cacheMsgID))
1362 1362
 		$cacheMsgID = array();
1363 1363
 
1364 1364
 	// remove all $msgIDs which we already cached
1365
-	$msgIDs = array_flip(array_diff_key(array_flip($msgIDs), $cacheMsgID)) ;
1365
+	$msgIDs = array_flip(array_diff_key(array_flip($msgIDs), $cacheMsgID));
1366 1366
 
1367 1367
 	if (!empty($msgIDs))
1368 1368
 	{
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
 
1388 1388
 		foreach ($rows as $value)
1389 1389
 		{
1390
-			if(empty($cacheMsgID[$value['id_msg']]))
1390
+			if (empty($cacheMsgID[$value['id_msg']]))
1391 1391
 				$cacheMsgID[$value['id_msg']] = [];
1392 1392
 			$cacheMsgID[$value['id_msg']][$value['id_attach']] = $value;
1393 1393
 		}
Please login to merge, or discard this patch.