Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #162 from silverstripe-rebelalliance/3.0_5880

BUG: open ticket 5880 always show the current page type in the page type...
  • Loading branch information...
commit d75a061c6f99d488a14c398593bf92597ab412d8 2 parents 69e4fa0 + b15faba
@hafriedlander hafriedlander authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/model/SiteTree.php
View
6 code/model/SiteTree.php
@@ -2333,7 +2333,11 @@ protected function getClassDropdown() {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.