Code Duplication    Length = 12-12 lines in 2 locations

Sources/News.php 2 locations

@@ 947-958 (lines=12) @@
944
		elseif ($xml_format == 'atom')
945
		{
946
			// Only one attachment allowed
947
			if (!empty($loaded_attachments))
948
			{
949
				$attachment = array_pop($loaded_attachments);
950
				$enclosure = array(
951
					'rel' => 'enclosure',
952
					'href' => fix_possible_url($scripturl . '?action=dlattach;topic=' . $attachment['topic'] . '.0;attach=' . $attachment['id_attach']),
953
					'length' => $attachment['filesize'],
954
					'type' => $attachment['mime_type'],
955
				);
956
			}
957
			else
958
				$enclosure = null;
959
960
			$data[] = array(
961
				'tag' => 'entry',
@@ 1357-1368 (lines=12) @@
1354
		elseif ($xml_format == 'atom')
1355
		{
1356
			// Only one attachment allowed
1357
			if (!empty($loaded_attachments))
1358
			{
1359
				$attachment = array_pop($loaded_attachments);
1360
				$enclosure = array(
1361
					'rel' => 'enclosure',
1362
					'href' => fix_possible_url($scripturl . '?action=dlattach;topic=' . $attachment['topic'] . '.0;attach=' . $attachment['id_attach']),
1363
					'length' => $attachment['filesize'],
1364
					'type' => $attachment['mime_type'],
1365
				);
1366
			}
1367
			else
1368
				$enclosure = null;
1369
1370
			$data[] = array(
1371
				'tag' => 'entry',