Code Duplication    Length = 8-9 lines in 2 locations

code/model/SiteTree.php 2 locations

@@ 2242-2249 (lines=8) @@
2239
			return $actions;
2240
		}
2241
2242
		if($this->isPublished() && $this->canPublish() && !$this->getIsDeletedFromStage() && $this->canUnpublish()) {
2243
			// "unpublish"
2244
			$moreOptions->push(
2245
				FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete')
2246
					->setDescription(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'))
2247
					->addExtraClass('ss-ui-action-destructive')
2248
			);
2249
		}
2250
2251
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2252
			if($this->isPublished() && $this->canEdit())	{
@@ 2251-2259 (lines=9) @@
2248
			);
2249
		}
2250
2251
		if($this->stagesDiffer('Stage', 'Live') && !$this->getIsDeletedFromStage()) {
2252
			if($this->isPublished() && $this->canEdit())	{
2253
				// "rollback"
2254
				$moreOptions->push(
2255
					FormAction::create('rollback', _t('SiteTree.BUTTONCANCELDRAFT', 'Cancel draft changes'), 'delete')
2256
						->setDescription(_t('SiteTree.BUTTONCANCELDRAFTDESC', 'Delete your draft and revert to the currently published page'))
2257
				);
2258
			}
2259
		}
2260
2261
		if($this->canEdit()) {
2262
			if($this->getIsDeletedFromStage()) {