Code Duplication    Length = 8-9 lines in 2 locations

code/model/SiteTree.php 2 locations

@@ 2133-2140 (lines=8) @@
2130
			return $actions;
2131
		}
2132
2133
		if($this->isPublished() && $this->canPublish() && !$this->getIsDeletedFromStage() && $this->canUnpublish()) {
2134
			// "unpublish"
2135
			$moreOptions->push(
2136
				FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete')
2137
					->setDescription(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'))
2138
					->addExtraClass('ss-ui-action-destructive')
2139
			);
2140
		}
2141
2142
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2143
			if($this->isPublished() && $this->canEdit())	{
@@ 2142-2150 (lines=9) @@
2139
			);
2140
		}
2141
2142
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2143
			if($this->isPublished() && $this->canEdit())	{
2144
				// "rollback"
2145
				$moreOptions->push(
2146
					FormAction::create('rollback', _t('SiteTree.BUTTONCANCELDRAFT', 'Cancel draft changes'), 'delete')
2147
						->setDescription(_t('SiteTree.BUTTONCANCELDRAFTDESC', 'Delete your draft and revert to the currently published page'))
2148
				);
2149
			}
2150
		}
2151
2152
		if($this->canEdit()) {
2153
			if($this->getIsDeletedFromStage()) {