[BUGFIX] Show correct record title
authorXavier Perseguers <typo3@perseguers.ch>
Mon, 30 May 2011 07:18:59 +0000 (09:18 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 2 Jun 2011 07:54:21 +0000 (09:54 +0200)
Show correct record title in backend module using t3lib_BEfunc::getRecordTitle()
in template.php and beuser module.

Change-Id: I07bb88509f37a3218d89149a71705054ed75985d
Resolves: #27100
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/2409
Reviewed-by: Markus Klein
Reviewed-by: Stefan Neufeind
Reviewed-by: Andy Grunwald
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_tcemain.php
typo3/sysext/beuser/mod/index.php
typo3/template.php

index 63e40b9..40674e6 100644 (file)
@@ -343,7 +343,11 @@ class t3lib_admin {
                                );
                                $lostIdList = array();
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($garbage)) {
-                                       $this->lRecords[$table][$row['uid']] = array('uid' => $row['uid'], 'pid' => $row['pid'], 'title' => strip_tags($row[$GLOBALS['TCA'][$table]['ctrl']['label']]));
+                                       $this->lRecords[$table][$row['uid']] = array(
+                                               'uid' => $row['uid'],
+                                               'pid' => $row['pid'],
+                                               'title' => strip_tags(t3lib_BEfunc::getRecordTitle($table, $row)),
+                                       );
                                        $lostIdList[] = $row['uid'];
                                }
                                if ($table == 'pages') {
index 66acb09..01c9241 100644 (file)
@@ -5596,7 +5596,7 @@ class t3lib_TCEmain {
                        t3lib_BEfunc::fixVersioningPid($table, $row);
 
                        $out = array(
-                               'header' => $row[$GLOBALS['TCA'][$table]['ctrl']['label']],
+                               'header' => t3lib_BEfunc::getRecordTitle($table, $row),
                                'pid' => $row['pid'],
                                'event_pid' => $this->eventPid($table, isset($row['_ORIG_pid']) ? $row['t3ver_oid'] : $row['uid'], $row['pid']),
                                't3ver_state' => $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? $row['t3ver_state'] : '',
index acccc43..4f6aefd 100755 (executable)
@@ -681,7 +681,10 @@ class local_beUserAuth extends t3lib_beUserAuth {
                                                foreach ($uGroups as $vv) {
                                                        if ($vv) {
                                                                $uGRow = t3lib_BEfunc::getRecord('be_groups',$vv);
-                                                               $pout[]='<tr><td nowrap="nowrap">'.t3lib_iconWorks::getSpriteIconForRecord('be_groups',$uGRow).'&nbsp;'.htmlspecialchars($uGRow['title']).'&nbsp;&nbsp;</td><td width=1% nowrap="nowrap">'.$GLOBALS['SOBE']->elementLinks('be_groups',$uGRow).'</td></tr>';
+                                                               $title = t3lib_BEfunc::getRecordTitle('be_groups', $uGRow);
+                                                               $pout[] = '<tr><td nowrap="nowrap">' . t3lib_iconWorks::getSpriteIconForRecord('be_groups', $uGRow) .
+                                                                       '&nbsp;' . htmlspecialchars($title) . '&nbsp;&nbsp;</td><td width="1%" nowrap="nowrap">' .
+                                                                       $GLOBALS['SOBE']->elementLinks('be_groups', $uGRow) . '</td></tr>';
                                                        }
                                                }
                                                $out[$k] = '<table border="0" cellpadding="0" cellspacing="0" width="100%">'.implode('',$pout).'</table>';
index 018658f..415d76b 100644 (file)
@@ -469,7 +469,7 @@ class template {
        function getHeader($table,$row,$path,$noViewPageIcon=0,$tWrap=array('',''))     {
                if (is_array($row) && $row['uid'])      {
                        $iconImgTag=t3lib_iconWorks::getSpriteIconForRecord($table, $row , array('title' => htmlspecialchars($path)));
-                       $title = strip_tags($row[$GLOBALS['TCA'][$table]['ctrl']['label']]);
+                       $title = strip_tags(t3lib_BEfunc::getRecordTitle($table, $row));
                        $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'],$this->backPath,'');
                        if ($table=='pages')    $path.=' - '.t3lib_BEfunc::titleAttribForPages($row,'',0);
                } else {