Code Duplication    Length = 8-9 lines in 2 locations

code/model/SiteTree.php 2 locations

@@ 2093-2100 (lines=8) @@
2090
			return $actions;
2091
		}
2092
2093
		if($this->isPublished() && $this->canPublish() && !$this->getIsDeletedFromStage() && $this->canUnpublish()) {
2094
			// "unpublish"
2095
			$moreOptions->push(
2096
				FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete')
2097
					->setDescription(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'))
2098
					->addExtraClass('ss-ui-action-destructive')
2099
			);
2100
		}
2101
2102
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2103
			if($this->isPublished() && $this->canEdit())	{
@@ 2102-2110 (lines=9) @@
2099
			);
2100
		}
2101
2102
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2103
			if($this->isPublished() && $this->canEdit())	{
2104
				// "rollback"
2105
				$moreOptions->push(
2106
					FormAction::create('rollback', _t('SiteTree.BUTTONCANCELDRAFT', 'Cancel draft changes'), 'delete')
2107
						->setDescription(_t('SiteTree.BUTTONCANCELDRAFTDESC', 'Delete your draft and revert to the currently published page'))
2108
				);
2109
			}
2110
		}
2111
2112
		if($this->canEdit()) {
2113
			if($this->getIsDeletedFromStage()) {