Code Duplication    Length = 6-6 lines in 2 locations

Sources/Attachments.php 1 location

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

Sources/Post.php 1 location

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