Ensure action is set when loading contactFooter
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 10 Nov 2021 20:18:10 +0000 (09:18 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 10 Nov 2021 20:18:28 +0000 (09:18 +1300)
CRM/Contact/Form/Inline.php
templates/CRM/common/contactFooter.tpl

index 2f551a1cead28caba1ff536e2fc654f702b89379..ea93dde40ddc58c02e7299e91bf7733201516a7d 100644 (file)
@@ -162,6 +162,7 @@ abstract class CRM_Contact_Form_Inline extends CRM_Core_Form {
       'contact_view_options', TRUE
     );
     $smarty->assign('changeLog', $viewOptions['log']);
+    $smarty->ensureVariablesAreAssigned(['action']);
     $ret = ['markup' => $smarty->fetch('CRM/common/contactFooter.tpl')];
     if ($includeCount) {
       $ret['count'] = CRM_Contact_BAO_Contact::getCountComponent('log', $cid);
index 76cc62b511e308d4af3fed120c9d4f00177bcbac..d87f279f9707f1a4bc3d2ccc02f198f213b8b610 100644 (file)
@@ -12,7 +12,7 @@
 <div class="crm-footer" id="crm-record-log">
   <span class="col1">
     {if !empty($external_identifier)}{ts}External ID{/ts}:&nbsp;{$external_identifier}{/if}
-    {if !isset($action) || (isset($action) && $action NEQ 2)}&nbsp; &nbsp;{ts}Contact ID{/ts}:&nbsp;{$contactId}{/if}
+    {if $action !== 2}&nbsp; &nbsp;{ts}Contact ID{/ts}:&nbsp;{$contactId}{/if}
   </span>
   {if !empty($lastModified)}
     {ts}Last Change by{/ts}: <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$lastModified.id`"}">{$lastModified.name}</a> ({$lastModified.date|crmDate}) &nbsp;