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