Code Duplication    Length = 9-9 lines in 2 locations

code/admin/CommentsGridFieldAction.php 2 locations

@@ 44-52 (lines=9) @@
41
42
		$field = "";
43
44
		if(!$record->IsSpam || !$record->Moderated) {
45
			$field .= GridField_FormAction::create(
46
				$gridField,
47
				'CustomAction' . $record->ID . 'Spam',
48
				'Spam',
49
				'spam',
50
				array('RecordID' => $record->ID)
51
			)->Field();
52
		}
53
54
		if($record->IsSpam || !$record->Moderated) {
55
			$field .= GridField_FormAction::create(
@@ 54-62 (lines=9) @@
51
			)->Field();
52
		}
53
54
		if($record->IsSpam || !$record->Moderated) {
55
			$field .= GridField_FormAction::create(
56
				$gridField,
57
				'CustomAction' . $record->ID . 'Approve',
58
				'Approve',
59
				'approve',
60
				array('RecordID' => $record->ID)
61
			)->Field();
62
		}
63
64
		return $field;
65
	}