Bug #22970 » 22970_v61_BackendUtility_getProcessedValue.patch

Caspar Stuebs, 2013-10-21 12:13

View differences:

typo3/sysext/backend/Classes/Utility/BackendUtility.php
1975 1975
				$l = $GLOBALS['LANG']->sL($l);
1976 1976
				break;
1977 1977
			case 'select':
1978
			case 'inline':
1978 1979
				if ($theColConf['MM']) {
1979 1980
					if ($uid) {
1980 1981
						// Display the title of MM related records in lists
......
2011 2012
				} else {
2012 2013
					$l = self::getLabelsFromItemsList($table, $col, $value);
2013 2014
					if ($theColConf['foreign_table'] && !$l && $GLOBALS['TCA'][$theColConf['foreign_table']]) {
2014
						if ($noRecordLookup) {
2015
						if ($noRecordLookup || ($theColConf['type'] === 'inline' && !$uid)) {
2015 2016
							$l = $value;
2016 2017
						} else {
2017
							$rParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, 1);
2018
							if ($theColConf['type'] === 'inline') {
2019
								$rParts = array();
2020
									// Look up for records
2021
								$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
2022
									'ref_uid',
2023
									'sys_refindex',
2024
									'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex') .
2025
										' AND recuid=' . intval($uid) .
2026
										' AND ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($theColConf['foreign_table'], 'sys_refindex'),
2027
									'',
2028
									'sorting'
2029
								);
2030
								while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
2031
									$rParts[] = $row['ref_uid'];
2032
								}
2033
							} else {
2034
								$rParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, 1);
2035
							}
2018 2036
							$lA = array();
2019 2037
							foreach ($rParts as $rVal) {
2020 2038
								$rVal = intval($rVal);
......
2029 2047
									$lA[] = $rVal ? '[' . $rVal . '!]' : '';
2030 2048
								}
2031 2049
							}
2032
							$l = implode(', ', $lA);
2050
							$l = implode('; ', $lA);
2033 2051
						}
2034 2052
					}
2035 2053
				}
(3-3/3)