Code Duplication    Length = 3-3 lines in 2 locations

code/Controllers/CMSMain.php 2 locations

@@ 1997-1999 (lines=3) @@
1994
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
1995
            /** @var SiteTree $page */
1996
            $page = SiteTree::get()->byID($id);
1997
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
1998
                return Security::permissionFailure($this);
1999
            }
2000
            if (!$page || !$page->ID) {
2001
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
2002
            }
@@ 2041-2043 (lines=3) @@
2038
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
2039
            /** @var SiteTree $page */
2040
            $page = SiteTree::get()->byID($id);
2041
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
2042
                return Security::permissionFailure($this);
2043
            }
2044
            if (!$page || !$page->ID) {
2045
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
2046
            }