コード例 #1
0
 /**
  * Returns the title for the input record. If blank, a "no title" labele (localized) will be returned.
  * '_title' is used for setting an alternative title for folders.
  *
  * @param	array		The input row array (where the key "_title" is used for the title)
  * @param	integer		Title length (30)
  * @return	string		The title.
  */
 function getTitleStr($row, $titleLen = 30)
 {
     return $row['_title'] ? $row['_title'] : parent::getTitleStr($row, $titleLen);
 }
コード例 #2
0
 /**
  * Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
  * Do NOT htmlspecialchar the string from this function - has already been done.
  *
  * @param	array		The input row array (where the key "title" is used for the title)
  * @param	integer		Title length (30)
  * @return	string		The title.
  */
 function getTitleStr($row, $titleLen = 30)
 {
     // get the basic title from the parent implementation in t3lib_treeview
     $title = parent::getTitleStr($row, $titleLen);
     if (isset($row['is_siteroot']) && $row['is_siteroot'] != 0 && $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
         $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('domainName,sorting', 'sys_domain', 'pid=' . $GLOBALS['TYPO3_DB']->quoteStr($row['uid'] . t3lib_BEfunc::deleteClause('sys_domain') . t3lib_BEfunc::BEenableFields('sys_domain'), 'sys_domain'), '', 'sorting', 1);
         if (is_array($rows) && count($rows) > 0) {
             $title = sprintf('%s [%s]', $title, htmlspecialchars($rows[0]['domainName']));
         }
     }
     return $title;
 }