|
@@ 1990-1992 (lines=3) @@
|
| 1987 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 1988 |
|
/** @var SiteTree $page */ |
| 1989 |
|
$page = SiteTree::get()->byID($id); |
| 1990 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 1991 |
|
return Security::permissionFailure($this); |
| 1992 |
|
} |
| 1993 |
|
if (!$page || !$page->ID) { |
| 1994 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 1995 |
|
} |
|
@@ 2034-2036 (lines=3) @@
|
| 2031 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 2032 |
|
/** @var SiteTree $page */ |
| 2033 |
|
$page = SiteTree::get()->byID($id); |
| 2034 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 2035 |
|
return Security::permissionFailure($this); |
| 2036 |
|
} |
| 2037 |
|
if (!$page || !$page->ID) { |
| 2038 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 2039 |
|
} |