Skip to content
This repository
Browse code

BUG: open ticket 5880 always show the current page type in the page t…

…ype dropdown list
  • Loading branch information...
commit b15fabaf0da1766d2a97f4b209404b7e181ecfc6 1 parent 69e4fa0
kmayo-ss authored July 16, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  code/model/SiteTree.php
6  code/model/SiteTree.php
@@ -2333,7 +2333,11 @@ protected function getClassDropdown() {
2333 2333
 		$result = array();
2334 2334
 		foreach($classes as $class) {
2335 2335
 			$instance = singleton($class);
2336  
-			if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
  2336
+
  2337
+			// 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
  2338
+			if ($this->ClassName != $instance->ClassName) {
  2339
+				if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
  2340
+			}
2337 2341
 			
2338 2342
 			if($perms = $instance->stat('need_permission')) {
2339 2343
 				if(!$this->can($perms)) continue;

0 notes on commit b15faba

Please sign in to comment.
Something went wrong with that request. Please try again.