Skip to content
This repository
Browse code

BUG fix getting translated string for page type description (Fixes #7…

…781).
  • Loading branch information...
commit 4bbd90487b4ff0efa4bcb89085b87f4ebb764cb4 1 parent 18a40b4
Will Rossiter authored August 12, 2012

Showing 1 changed file with 10 additions and 3 deletions. Show diff stats Hide diff stats

  1. 13  code/controllers/CMSMain.php
13  code/controllers/CMSMain.php
@@ -466,9 +466,15 @@ public function PageTypes() {
466 466
 			$addAction = $instance->i18n_singular_name();
467 467
 			
468 468
 			// Get description
469  
-			$description = _t($class . 'DESCRIPTION');
470  
-			if(!$description) $description = $instance->uninherited('description');
471  
-			if($class == 'Page' && !$description) $description = singleton('SiteTree')->uninherited('description');
  469
+			$description = _t($class . '.DESCRIPTION');
  470
+
  471
+			if(!$description) {
  472
+				$description = $instance->uninherited('description');
  473
+			}
  474
+			
  475
+			if($class == 'Page' && !$description) {
  476
+				$description = singleton('SiteTree')->uninherited('description');
  477
+			}
472 478
 			
473 479
 			$result->push(new ArrayData(array(
474 480
 				'ClassName' => $class,
@@ -480,6 +486,7 @@ public function PageTypes() {
480 486
 		}
481 487
 		
482 488
 		$result = $result->sort('AddAction');
  489
+		
483 490
 		return $result;
484 491
 	}
485 492
 

0 notes on commit 4bbd904

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