Skip to content

Commit

Permalink
Smarty notice fix on Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
highfalutin committed Mar 9, 2023
1 parent e14df11 commit 474651b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CRM/Dedupe/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,8 @@ public static function getRowsElementsAndInfo($mainId, $otherId, $checkPermissio

$relTables[$name]['main_url'] = str_replace('$cid', $mainId, $relTables[$name]['url']);
$relTables[$name]['other_url'] = str_replace('$cid', $otherId, $relTables[$name]['url']);
$relTables[$name]['has_operation'] = 0;

if ($name === 'rel_table_users') {
// @todo - this user url stuff is only needed for the form layer - move to CRM_Contact_Form_Merge
$relTables[$name]['main_url'] = str_replace('%ufid', CRM_Core_BAO_UFMatch::getUFId($mainId), $relTables[$name]['url']);
Expand All @@ -1599,6 +1601,7 @@ public static function getRowsElementsAndInfo($mainId, $otherId, $checkPermissio
$attributes,
];
$migrationInfo["operation"]["move_{$name}"]['add'] = 1;
$relTables[$name]['has_operation'] = 1;
}
}
foreach ($relTables as $name => $null) {
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contact/Form/Merge.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</td>

<td style='white-space: nowrap'>
{if $form.$field}=={$form.$field.html|crmAddClass:"select-row"}==&gt;{/if}
{if array_key_exists($field, $form) && $form.$field}=={$form.$field.html|crmAddClass:"select-row"}==&gt;{/if}
</td>

{* For location blocks *}
Expand Down Expand Up @@ -219,7 +219,7 @@
</tr>
{else}
<tr class="{cycle values="even-row,odd-row"}">
<td><strong>{ts}Move related...{/ts}</strong></td><td><a href="{$params.other_url}">{$params.title}</a></td><td style='white-space: nowrap'>=={$form.$paramName.html|crmAddClass:"select-row"}==&gt;</td><td><a href="{$params.main_url}">{$params.title}</a>{if $form.operation.$paramName.add.html}&nbsp;{$form.operation.$paramName.add.html}{/if}</td>
<td><strong>{ts}Move related...{/ts}</strong></td><td><a href="{$params.other_url}">{$params.title}</a></td><td style='white-space: nowrap'>=={$form.$paramName.html|crmAddClass:"select-row"}==&gt;</td><td><a href="{$params.main_url}">{$params.title}</a>{if $params.has_operation}&nbsp;{$form.operation.$paramName.add.html}{/if}</td>
<td>({ts}migrate{/ts})</td>
</tr>
{/if}
Expand Down

0 comments on commit 474651b

Please sign in to comment.