mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Fixed regression in SiteTree->getCMSActions()
Caused by toolbar recent changes
This commit is contained in:
parent
1d470fe718
commit
74d63791b7
@ -2087,6 +2087,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$moreOptions->push(FormAction::create('email', _t('CMSMain.EMAIL', 'Email')));
|
$moreOptions->push(FormAction::create('email', _t('CMSMain.EMAIL', 'Email')));
|
||||||
$moreOptions->push(FormAction::create('rollback', _t('CMSMain.ROLLBACK', 'Roll back to this version')));
|
$moreOptions->push(FormAction::create('rollback', _t('CMSMain.ROLLBACK', 'Roll back to this version')));
|
||||||
|
|
||||||
|
$actions = new FieldList(array($majorActions, $rootTabSet));
|
||||||
|
|
||||||
// getCMSActions() can be extended with updateCMSActions() on a extension
|
// getCMSActions() can be extended with updateCMSActions() on a extension
|
||||||
$this->extend('updateCMSActions', $actions);
|
$this->extend('updateCMSActions', $actions);
|
||||||
|
|
||||||
@ -2163,10 +2165,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$actions = new FieldList(array($majorActions, $rootTabSet));
|
||||||
|
|
||||||
// Hook for extensions to add/remove actions.
|
// Hook for extensions to add/remove actions.
|
||||||
$this->extend('updateCMSActions', $actions);
|
$this->extend('updateCMSActions', $actions);
|
||||||
|
|
||||||
return new FieldList(array($majorActions, $rootTabSet));
|
return $actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -182,9 +182,10 @@ class CMSMainTest extends FunctionalTest {
|
|||||||
$parentPage->doUnpublish();
|
$parentPage->doUnpublish();
|
||||||
$childPage->doUnpublish();
|
$childPage->doUnpublish();
|
||||||
|
|
||||||
$this->assertContains(
|
$actions = $childPage->getCMSActions()->dataFields();
|
||||||
|
$this->assertArrayHasKey(
|
||||||
'action_publish',
|
'action_publish',
|
||||||
$childPage->getCMSActions()->column('Name'),
|
$actions,
|
||||||
'Can publish a page with an unpublished parent with strict hierarchy off'
|
'Can publish a page with an unpublished parent with strict hierarchy off'
|
||||||
);
|
);
|
||||||
SiteTree::set_enforce_strict_hierarchy(false);
|
SiteTree::set_enforce_strict_hierarchy(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user