Skip to content

Commit

Permalink
BUG: open ticket 5880 always show the current page type in the page t…
Browse files Browse the repository at this point in the history
…ype dropdown list
  • Loading branch information
kmayo-ss committed Jul 16, 2012
1 parent 69e4fa0 commit b15faba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/model/SiteTree.php
Expand Up @@ -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;
Expand Down

0 comments on commit b15faba

Please sign in to comment.