From: Georg Ringer Date: Wed, 9 Dec 2015 13:34:47 +0000 (+0100) Subject: [BUGFIX] Use correct title for links to create new records X-Git-Tag: 7.6.1~46 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/85df77938cb60aeac902ce5433c546fc0058c72b [BUGFIX] Use correct title for links to create new records If records can not be sorted, the title of the link should just state 'Create new record' instead of 'create new record after this record'. Change-Id: I270ff1043b31366fbb8c90a259d52583a178f301 Resolves: #69934 Releases: master Reviewed-on: https://review.typo3.org/45195 Reviewed-by: Andreas Fernandez Reviewed-by: Josef Glatz Tested-by: Andreas Fernandez Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters --- diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php index e3d6c7fd80dc..99a7b6951307 100644 --- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php @@ -1465,8 +1465,12 @@ class DatabaseRecordList extends AbstractDatabaseRecordList if ($this->showNewRecLink($table)) { $params = '&edit[' . $table . '][' . -($row['_MOVE_PLH'] ? $row['_MOVE_PLH_uid'] : $row['uid']) . ']=new'; $icon = ($table == 'pages' ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)); + $titleLabel = 'new'; + if ($GLOBALS['TCA'][$table]['ctrl']['sortby']) { + $titleLabel .= ($table === 'pages' ? 'Page' : 'Record'); + } $newAction = '' + . '" title="' . htmlspecialchars($this->getLanguageService()->getLL($titleLabel)) . '">' . $icon->render() . ''; $this->addActionToCellGroup($cells, $newAction, 'new'); }