Code Duplication    Length = 3-3 lines in 2 locations

code/Controllers/CMSMain.php 2 locations

@@ 1576-1578 (lines=3) @@
1573
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
1574
            /** @var SiteTree $page */
1575
            $page = SiteTree::get()->byID($id);
1576
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
1577
                return Security::permissionFailure($this);
1578
            }
1579
            if (!$page || !$page->ID) {
1580
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
1581
            }
@@ 1620-1622 (lines=3) @@
1617
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
1618
            /** @var SiteTree $page */
1619
            $page = SiteTree::get()->byID($id);
1620
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
1621
                return Security::permissionFailure($this);
1622
            }
1623
            if (!$page || !$page->ID) {
1624
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
1625
            }