|
@@ 274-277 (lines=4) @@
|
| 271 |
|
$resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childArray); |
| 272 |
|
|
| 273 |
|
// If this is a new record, add a pid value to store this record and the pointer value for the intermediate table |
| 274 |
|
if ($childData['command'] === 'new') { |
| 275 |
|
$comboFormFieldName = 'data[' . $childData['tableName'] . '][' . $childData['databaseRow']['uid'] . '][pid]'; |
| 276 |
|
$resultArray['html'] .= '<input type="hidden" name="' . htmlspecialchars($comboFormFieldName) . '" value="' . htmlspecialchars($childData['databaseRow']['pid']) . '" />'; |
| 277 |
|
} |
| 278 |
|
// If the foreign_selector field is also responsible for uniqueness, tell the browser the uid of the "other" side of the relation |
| 279 |
|
if ($childData['command'] === 'new' || $parentConfig['foreign_unique'] === $parentConfig['foreign_selector']) { |
| 280 |
|
$parentFormFieldName = 'data' . $appendFormFieldNames . '[' . $parentConfig['foreign_selector'] . ']'; |
|
@@ 279-282 (lines=4) @@
|
| 276 |
|
$resultArray['html'] .= '<input type="hidden" name="' . htmlspecialchars($comboFormFieldName) . '" value="' . htmlspecialchars($childData['databaseRow']['pid']) . '" />'; |
| 277 |
|
} |
| 278 |
|
// If the foreign_selector field is also responsible for uniqueness, tell the browser the uid of the "other" side of the relation |
| 279 |
|
if ($childData['command'] === 'new' || $parentConfig['foreign_unique'] === $parentConfig['foreign_selector']) { |
| 280 |
|
$parentFormFieldName = 'data' . $appendFormFieldNames . '[' . $parentConfig['foreign_selector'] . ']'; |
| 281 |
|
$resultArray['html'] .= '<input type="hidden" name="' . htmlspecialchars($parentFormFieldName) . '" value="' . htmlspecialchars($childData['databaseRow']['uid']) . '" />'; |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
return $resultArray; |
| 285 |
|
} |