Fixed bug #17158: Pagetree: now uses [No title] from language file if no title is...
[Packages/TYPO3.CMS.git] / t3lib / tree / pagetree / class.t3lib_tree_pagetree_commands.php
index 4e9b12d..c06ee74 100644 (file)
@@ -303,7 +303,13 @@ final class t3lib_tree_pagetree_Commands {
                        $field = 'nav_title';
                        $text = $record['nav_title'];
                }
-               $visibleText = t3lib_div::fixed_lgd_cs($text, $titleLength);
+
+               if (trim($text) === '') {
+                       $visibleText = '[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.no_title', TRUE) . ']';
+               } else {
+                       $visibleText = $text;
+               }
+               $visibleText = t3lib_div::fixed_lgd_cs($visibleText, $titleLength);
 
                $suffix = '';
                if ($addDomainName) {
@@ -339,4 +345,4 @@ final class t3lib_tree_pagetree_Commands {
        }
 }
 
-?>
+?>
\ No newline at end of file