Bug #22970 » 22970_v45_t3lib_befunc_getProcessedValue.patch

Caspar Stuebs, 2013-10-21 12:13

View differences:

t3lib/class.t3lib_befunc.php
2357 2357
					$l = $GLOBALS['LANG']->sL($l);
2358 2358
					break;
2359 2359
				case 'select':
2360
				case 'inline':
2360 2361
					if ($theColConf['MM']) {
2361 2362
						if ($uid) {
2362 2363
								// Display the title of MM related records in lists
......
2400 2401
						$l = self::getLabelsFromItemsList($table, $col, $value);
2401 2402

  
2402 2403
						if ($theColConf['foreign_table'] && !$l && $TCA[$theColConf['foreign_table']]) {
2403
							if ($noRecordLookup) {
2404
							if ($noRecordLookup || ($theColConf['type'] === 'inline' && !$uid)) {
2404 2405
								$l = $value;
2405 2406
							} else {
2406
								$rParts = t3lib_div::trimExplode(',', $value, 1);
2407
								if ($theColConf['type'] === 'inline') {
2408
									$rParts = array();
2409
										// Look up for records
2410
									$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
2411
										'ref_uid',
2412
										'sys_refindex',
2413
										'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex') .
2414
											' AND recuid=' . intval($uid) .
2415
											' AND ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($theColConf['foreign_table'], 'sys_refindex'),
2416
										'',
2417
										'sorting'
2418
									);
2419
									while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
2420
										$rParts[] = $row['ref_uid'];
2421
									}
2422
								} else {
2423
									$rParts = t3lib_div::trimExplode(',', $value, 1);
2424
								}
2407 2425
								$lA = array();
2408 2426
								foreach ($rParts as $rVal) {
2409 2427
									$rVal = intval($rVal);
......
2418 2436
										$lA[] = $rVal ? '[' . $rVal . '!]' : '';
2419 2437
									}
2420 2438
								}
2421
								$l = implode(', ', $lA);
2439
								$l = implode('; ', $lA);
2422 2440
							}
2423 2441
						}
2424 2442
					}
(2-2/3)