Bug #22970 » t3lib_befunc_getProcessedValue_show_item.patch

Administrator Admin, 2010-06-23 12:31

View differences:

t3lib/class.t3lib_befunc.php (Arbeitskopie)
2172 2172
					$l = $GLOBALS['LANG']->sL($l);
2173 2173
				break;
2174 2174
				case 'select':
2175
				case 'inline':
2175 2176
					if ($theColConf['MM']) {
2176 2177
						// Display the title of MM related records in lists
2177 2178
						if ($noRecordLookup) {
......
2211 2212
						$l = self::getLabelFromItemlist($table, $col, $value);
2212 2213
						$l = $GLOBALS['LANG']->sL($l);
2213 2214
						if ($theColConf['foreign_table'] && !$l && $TCA[$theColConf['foreign_table']]) {
2214
							if ($noRecordLookup) {
2215
							if ($noRecordLookup || ((string)$theColConf['type'] == 'inline' && !$uid)) {
2215 2216
								$l = $value;
2216 2217
							} else {
2217
								$rParts = t3lib_div::trimExplode(',', $value, 1);
2218
								if((string)$theColConf['type'] == 'inline') {
2219
									$rParts = array();
2220
										// Look up for records
2221
									$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
2222
										'ref_uid',
2223
										'sys_refindex',
2224
										'tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex').
2225
											' AND recuid='.intval($uid).
2226
											' AND ref_table='.$GLOBALS['TYPO3_DB']->fullQuoteStr($theColConf['foreign_table'],'sys_refindex'),
2227
										'',
2228
										'sorting'
2229
									);
2230
									while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
2231
										$rParts[] = $row['ref_uid'];
2232
									}
2233
								}
2234
								else {
2235
									$rParts = t3lib_div::trimExplode(',', $value, 1);
2236
								}
2218 2237
								$lA = array();
2219 2238
								foreach ($rParts as $rVal) {
2220 2239
									$rVal = intval($rVal);
......
2229 2248
										$lA[] = $rVal?'['.$rVal.'!]':'';
2230 2249
									}
2231 2250
								}
2232
								$l = implode(', ', $lA);
2251
								$l = implode('; ', $lA);
2233 2252
							}
2234 2253
						}
2235 2254
					}
......
2245 2264
						foreach ($theColConf['items'] as $key => $val) {
2246 2265
							if ($value & pow(2, $key))	{$lA[] = $GLOBALS['LANG']->sL($val[0]);}
2247 2266
						}
2248
						$l = implode(', ', $lA);
2267
						$l = implode('; ', $lA);
2249 2268
					}
2250 2269
				break;
2251 2270
				case 'input':
typo3/show_item.php (Arbeitskopie)
286 286
					$tableRows[] = '
287 287
						<tr>
288 288
							<td class="t3-col-header">' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($this->table, $name), 1) . '</td>
289
							<td>' . htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table, $name, $this->row[$name])) . '</td>
289
							<td>' . htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $this->row['uid'])) . '</td>
290 290
						</tr>';
291 291
				}
292 292
			}
(1-1/3)