Code Duplication    Length = 8-9 lines in 2 locations

code/model/SiteTree.php 2 locations

@@ 2204-2211 (lines=8) @@
2201
			return $actions;
2202
		}
2203
2204
		if($this->isPublished() && $this->canPublish() && !$this->getIsDeletedFromStage() && $this->canUnpublish()) {
2205
			// "unpublish"
2206
			$moreOptions->push(
2207
				FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete')
2208
					->setDescription(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'))
2209
					->addExtraClass('ss-ui-action-destructive')
2210
			);
2211
		}
2212
2213
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2214
			if($this->isPublished() && $this->canEdit())	{
@@ 2213-2221 (lines=9) @@
2210
			);
2211
		}
2212
2213
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2214
			if($this->isPublished() && $this->canEdit())	{
2215
				// "rollback"
2216
				$moreOptions->push(
2217
					FormAction::create('rollback', _t('SiteTree.BUTTONCANCELDRAFT', 'Cancel draft changes'), 'delete')
2218
						->setDescription(_t('SiteTree.BUTTONCANCELDRAFTDESC', 'Delete your draft and revert to the currently published page'))
2219
				);
2220
			}
2221
		}
2222
2223
		if($this->canEdit()) {
2224
			if($this->getIsDeletedFromStage()) {