Code Duplication    Length = 14-17 lines in 2 locations

code/Controllers/CMSPageHistoryController.php 2 locations

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