|
@@ 1424-1426 (lines=3) @@
|
| 1421 |
|
|
| 1422 |
|
if(($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 1423 |
|
$page = SiteTree::get()->byID($id); |
| 1424 |
|
if($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 1425 |
|
return Security::permissionFailure($this); |
| 1426 |
|
} |
| 1427 |
|
if(!$page || !$page->ID) throw new SS_HTTPResponse_Exception("Bad record ID #$id", 404); |
| 1428 |
|
|
| 1429 |
|
$newPage = $page->duplicate(); |
|
@@ 1462-1464 (lines=3) @@
|
| 1459 |
|
increase_time_limit_to(); |
| 1460 |
|
if(($id = $this->urlParams['ID']) && is_numeric($id)) { |
| 1461 |
|
$page = SiteTree::get()->byID($id); |
| 1462 |
|
if($page && (!$page->canEdit() || !$page->canCreate(null, array('Parent' => $page->Parent())))) { |
| 1463 |
|
return Security::permissionFailure($this); |
| 1464 |
|
} |
| 1465 |
|
if(!$page || !$page->ID) throw new SS_HTTPResponse_Exception("Bad record ID #$id", 404); |
| 1466 |
|
|
| 1467 |
|
$newPage = $page->duplicateWithChildren(); |