Code Duplication    Length = 14-17 lines in 2 locations

code/Controllers/CMSPageHistoryController.php 2 locations

@@ 63-76 (lines=14) @@
60
	 * @param HTTPRequest $request
61
	 * @return array
62
	 */
63
	public function show($request) {
64
		$form = $this->ShowVersionForm($request->param('VersionID'));
65
66
		$negotiator = $this->getResponseNegotiator();
67
		$controller = $this;
68
		$negotiator->setCallback('CurrentForm', function() use(&$controller, &$form) {
69
			return $form ? $form->forTemplate() : $controller->renderWith($controller->getTemplatesWithSuffix('_Content'));
70
		});
71
		$negotiator->setCallback('default', function() use(&$controller, &$form) {
72
			return $controller->customise(array('EditForm' => $form))->renderWith($controller->getViewer('show'));
73
		});
74
75
		return $negotiator->respond($request);
76
	}
77
78
	/**
79
	 * @param HTTPRequest $request
@@ 82-98 (lines=17) @@
79
	 * @param HTTPRequest $request
80
	 * @return array
81
	 */
82
	public function compare($request) {
83
		$form = $this->CompareVersionsForm(
84
			$request->param('VersionID'),
85
			$request->param('OtherVersionID')
86
		);
87
88
		$negotiator = $this->getResponseNegotiator();
89
		$controller = $this;
90
		$negotiator->setCallback('CurrentForm', function() use(&$controller, &$form) {
91
			return $form ? $form->forTemplate() : $controller->renderWith($controller->getTemplatesWithSuffix('_Content'));
92
		});
93
		$negotiator->setCallback('default', function() use(&$controller, &$form) {
94
			return $controller->customise(array('EditForm' => $form))->renderWith($controller->getViewer('show'));
95
		});
96
97
		return $negotiator->respond($request);
98
	}
99
100
	public function getSilverStripeNavigator() {
101
		$record = $this->getRecord($this->currentPageID(), $this->getRequest()->param('VersionID'));