Code Duplication    Length = 6-6 lines in 2 locations

Sources/Attachments.php 1 location

@@ 155-160 (lines=6) @@
152
		$context['attachments']['quantity'] = 0;
153
154
		// If this isn't a new post, check the current attachments.
155
		if (isset($_REQUEST['msg']))
156
		{
157
			$context['attachments']['quantity'] = count($context['current_attachments']);
158
			foreach ($context['current_attachments'] as $attachment)
159
				$context['attachments']['total_size'] += $attachment['size'];
160
		}
161
162
		// A bit of house keeping first.
163
		if (!empty($_SESSION['temp_attachments']) && count($_SESSION['temp_attachments']) == 1)

Sources/Post.php 1 location

@@ 902-907 (lines=6) @@
899
		$context['attachments']['quantity'] = 0;
900
901
		// If this isn't a new post, check the current attachments.
902
		if (isset($_REQUEST['msg']))
903
		{
904
			$context['attachments']['quantity'] = count($context['current_attachments']);
905
			foreach ($context['current_attachments'] as $attachment)
906
				$context['attachments']['total_size'] += $attachment['size'];
907
		}
908
909
		// A bit of house keeping first.
910
		if (!empty($_SESSION['temp_attachments']) && count($_SESSION['temp_attachments']) == 1)