[BUGFIX] Show correct record title
authorJohannes Feustel <s@feustel.eu>
Sun, 5 Jun 2011 15:53:16 +0000 (17:53 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 19 Jun 2011 20:45:29 +0000 (22:45 +0200)
Show correct record title in backend module using t3lib_BEfunc::getRecordTitle()
in template.php and beuser module.

Change-Id: I1624c24698337bd505411b29e411a005a07eb006
Resolves: #27100
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/2529
Reviewed-by: Andreas Wolf
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Mario Rimann
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_tcemain.php
typo3/sysext/beuser/mod/index.php
typo3/template.php

index 0eb7f64..3fdc56f 100644 (file)
@@ -347,7 +347,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[$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 9e53b60..16720bf 100644 (file)
@@ -5603,7 +5603,7 @@ class t3lib_TCEmain {
                        t3lib_BEfunc::fixVersioningPid($table, $row);
 
                        $out = array(
-                               'header' => $row[$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' => $TCA[$table]['ctrl']['versioningWS'] ? $row['t3ver_state'] : '',
index 61f7594..9ddcbf0 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 2100ffb..6163410 100644 (file)
@@ -484,7 +484,7 @@ class template {
                global $TCA;
                if (is_array($row) && $row['uid'])      {
                        $iconImgTag=t3lib_iconWorks::getSpriteIconForRecord($table, $row , array('title' => htmlspecialchars($path)));
-                       $title= strip_tags($row[$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 {