|
@@ 2074-2076 (lines=3) @@
|
| 2071 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 2072 |
|
/** @var SiteTree $page */ |
| 2073 |
|
$page = SiteTree::get()->byID($id); |
| 2074 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 2075 |
|
return Security::permissionFailure($this); |
| 2076 |
|
} |
| 2077 |
|
if (!$page || !$page->ID) { |
| 2078 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 2079 |
|
} |
|
@@ 2118-2120 (lines=3) @@
|
| 2115 |
|
if (($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 2116 |
|
/** @var SiteTree $page */ |
| 2117 |
|
$page = SiteTree::get()->byID($id); |
| 2118 |
|
if ($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 2119 |
|
return Security::permissionFailure($this); |
| 2120 |
|
} |
| 2121 |
|
if (!$page || !$page->ID) { |
| 2122 |
|
throw new HTTPResponse_Exception("Bad record ID #$id", 404); |
| 2123 |
|
} |