|
@@ 2020-2022 (lines=3) @@
|
| 2017 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 2018 |
|
/** @var SiteTree $page */ |
| 2019 |
|
$page = SiteTree::get()->byID($id); |
| 2020 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 2021 |
|
return Security::permissionFailure($this); |
| 2022 |
|
} |
| 2023 |
|
if (!$page || !$page->ID) { |
| 2024 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 2025 |
|
} |
|
@@ 2064-2066 (lines=3) @@
|
| 2061 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 2062 |
|
/** @var SiteTree $page */ |
| 2063 |
|
$page = SiteTree::get()->byID($id); |
| 2064 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 2065 |
|
return Security::permissionFailure($this); |
| 2066 |
|
} |
| 2067 |
|
if (!$page || !$page->ID) { |
| 2068 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 2069 |
|
} |