mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #162 from silverstripe-rebelalliance/3.0_5880
BUG: open ticket 5880 always show the current page type in the page type...
This commit is contained in:
commit
d75a061c6f
@ -2333,7 +2333,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$result = array();
|
||||
foreach($classes as $class) {
|
||||
$instance = singleton($class);
|
||||
if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
|
||||
|
||||
// if the current page type is this the same as the class type always show the page type in the list see open ticket 5880 for why
|
||||
if ($this->ClassName != $instance->ClassName) {
|
||||
if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
|
||||
}
|
||||
|
||||
if($perms = $instance->stat('need_permission')) {
|
||||
if(!$this->can($perms)) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user