diff --git a/typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php b/typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php index 3a06138..1d79f4a 100644 --- a/typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php +++ b/typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php @@ -379,7 +379,7 @@ class SuggestWizardDefaultReceiver */ protected function getLabel($row) { - return BackendUtility::getRecordTitle($this->mmForeignTable ? $this->mmForeignTable : $this->table, $row, true); + return BackendUtility::getRecordTitle($this->mmForeignTable ? $this->mmForeignTable : $this->table, $row, true, true, false); } /** diff --git a/typo3/sysext/backend/Classes/Utility/BackendUtility.php b/typo3/sysext/backend/Classes/Utility/BackendUtility.php index 9d1829a..a3023af 100755 --- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php +++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php @@ -2161,9 +2161,10 @@ class BackendUtility * @param array $row Row from table * @param bool $prep If set, result is prepared for output: The output is cropped to a limited length (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '[No title]' is returned (localized). Further, the output is htmlspecialchars()'ed * @param bool $forceResult If set, the function always returns an output. If no value is found for the title, '[No title]' is returned (localized). + * @param bool $addToolTipOnCroppedResult defines if the tooltip from getRecordTitlePrep() should be added or not * @return string */ - public static function getRecordTitle($table, $row, $prep = false, $forceResult = true) + public static function getRecordTitle($table, $row, $prep = false, $forceResult = true, $addToolTipOnCroppedResult = true) { $cacheIdentifier = $table . '-' . $row['uid'] . '-prep-' . (int)$prep . '-forceResult-' . (int)$forceResult; if (isset(self::$recordTitleCache[$cacheIdentifier])) { @@ -2214,7 +2215,7 @@ class BackendUtility // If the current result is empty, set it to '[No title]' (localized) and prepare for output if requested if ($prep || $forceResult) { if ($prep) { - $recordTitle = self::getRecordTitlePrep($recordTitle); + $recordTitle = self::getRecordTitlePrep($recordTitle, 0 , $addToolTipOnCroppedResult); } if (trim($recordTitle) === '') { $recordTitle = self::getNoRecordTitle($prep); @@ -2232,9 +2233,10 @@ class BackendUtility * * @param string $title The title string to be cropped * @param int $titleLength Crop title after this length - if not set, BE_USER->uc['titleLen'] is used + * @param bool $addToolTipOnCroppedResult defines if the tooltip should be added or not - needs to be false for ajax calls like in the suggest wizard * @return string The processed title string, wrapped in | if cropped */ - public static function getRecordTitlePrep($title, $titleLength = 0) + public static function getRecordTitlePrep($title, $titleLength = 0, $addToolTipOnCroppedResult = true) { // If $titleLength is not a valid positive integer, use BE_USER->uc['titleLen']: if (!$titleLength || !MathUtility::canBeInterpretedAsInteger($titleLength) || $titleLength < 0) { @@ -2243,7 +2245,7 @@ class BackendUtility $titleOrig = htmlspecialchars($title); $title = htmlspecialchars(GeneralUtility::fixed_lgd_cs($title, $titleLength)); // If title was cropped, offer a tooltip: - if ($titleOrig != $title) { + if ($titleOrig != $title && $addToolTipOnCroppedResult) { $title = '' . $title . ''; } return $title;