Code Duplication    Length = 8-8 lines in 2 locations

code/Controllers/CMSPageHistoryController.php 2 locations

@@ 314-321 (lines=8) @@
311
		$form = $this->CompareVersionsForm($version1, $version2);
312
313
		// javascript solution, render into template
314
		if($this->getRequest()->isAjax()) {
315
			return $this->customise(array(
316
				"EditForm" => $form
317
			))->renderWith(array(
318
				static::class . '_EditForm',
319
				'LeftAndMain_Content'
320
			));
321
		}
322
323
		// non javascript, redirect the user to the page
324
		return $this->redirect(Controller::join_links(
@@ 352-359 (lines=8) @@
349
		}
350
351
		$request = $this->getRequest();
352
		if($request->isAjax()) {
353
			return $this->customise(array(
354
				"EditForm" => $this->ShowVersionForm($versionID)
355
			))->renderWith(array(
356
				static::class . '_EditForm',
357
				'LeftAndMain_Content'
358
			));
359
		}
360
361
		// non javascript, redirect the user to the page
362
		return $this->redirect(Controller::join_links(