Code Duplication    Length = 3-3 lines in 2 locations

code/Controllers/CMSMain.php 2 locations

@@ 1561-1563 (lines=3) @@
1558
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
1559
            /** @var SiteTree $page */
1560
            $page = SiteTree::get()->byID($id);
1561
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
1562
                return Security::permissionFailure($this);
1563
            }
1564
            if (!$page || !$page->ID) {
1565
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
1566
            }
@@ 1605-1607 (lines=3) @@
1602
        if (($id = $this->urlParams['ID']) && is_numeric($id)) {
1603
            /** @var SiteTree $page */
1604
            $page = SiteTree::get()->byID($id);
1605
            if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) {
1606
                return Security::permissionFailure($this);
1607
            }
1608
            if (!$page || !$page->ID) {
1609
                throw new HTTPResponse_Exception("Bad record ID #$id", 404);
1610
            }