mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1321 from silverstripe/revert-1319-pulls/3.2/sitetree-extension-points
Revert 7e2838c81c
This commit is contained in:
commit
8fb8c1e93c
@ -2534,8 +2534,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function doRestoreToStage() {
|
public function doRestoreToStage() {
|
||||||
$this->invokeWithExtensions('onBeforeRestoreToStage', $this);
|
|
||||||
|
|
||||||
// Ensure that the parent page is restored, otherwise restore to root
|
// Ensure that the parent page is restored, otherwise restore to root
|
||||||
if($this->isParentArchived()) {
|
if($this->isParentArchived()) {
|
||||||
$this->ParentID = 0;
|
$this->ParentID = 0;
|
||||||
@ -2565,8 +2563,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
|
|
||||||
Versioned::reading_stage($oldStage);
|
Versioned::reading_stage($oldStage);
|
||||||
|
|
||||||
$this->invokeWithExtensions('onAfterRestoreToStage', $this);
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2576,15 +2572,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
* @return bool Success
|
* @return bool Success
|
||||||
*/
|
*/
|
||||||
public function doArchive() {
|
public function doArchive() {
|
||||||
$this->invokeWithExtensions('onBeforeArchive', $this);
|
|
||||||
|
|
||||||
if($this->doUnpublish()) {
|
if($this->doUnpublish()) {
|
||||||
$this->delete();
|
$this->delete();
|
||||||
$this->invokeWithExtensions('onAfterArchive', $this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user