Code Duplication    Length = 7-9 lines in 2 locations

Sources/PostModeration.php 2 locations

@@ 95-103 (lines=9) @@
92
93
	$toAction = array();
94
	// Check if we have something to do?
95
	if (isset($_GET['approve']))
96
		$toAction[] = (int) $_GET['approve'];
97
	// Just a deletion?
98
	elseif (isset($_GET['delete']))
99
		$toAction[] = (int) $_GET['delete'];
100
	// Lots of approvals?
101
	elseif (isset($_POST['item']))
102
		foreach ($_POST['item'] as $item)
103
			$toAction[] = (int) $item;
104
105
	// What are we actually doing.
106
	if (isset($_GET['approve']) || (isset($_POST['do']) && $_POST['do'] == 'approve'))
@@ 335-341 (lines=7) @@
332
333
	// Get together the array of things to act on, if any.
334
	$attachments = array();
335
	if (isset($_GET['approve']))
336
		$attachments[] = (int) $_GET['approve'];
337
	elseif (isset($_GET['delete']))
338
		$attachments[] = (int) $_GET['delete'];
339
	elseif (isset($_POST['item']))
340
		foreach ($_POST['item'] as $item)
341
			$attachments[] = (int) $item;
342
343
	// Are we approving or deleting?
344
	if (isset($_GET['approve']) || (isset($_POST['do']) && $_POST['do'] == 'approve'))