Enotice fix for footer.tpl
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 6 Nov 2021 00:03:30 +0000 (13:03 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 10 Nov 2021 19:51:54 +0000 (08:51 +1300)
Ensure that contactId is always present

CRM/Core/Page.php
templates/CRM/common/footer.tpl

index 46ced4b0bd7054891860f0192d06ce96d323813d..6150a5a2afeaf032af4bb08d9196e0f626c4671c 100644 (file)
@@ -105,7 +105,15 @@ class CRM_Core_Page {
    *
    * @var string[]
    */
-  public $expectedSmartyVariables = ['breadcrumb', 'pageTitle', 'isForm', 'hookContent', 'hookContentPlacement'];
+  public $expectedSmartyVariables = [
+    'breadcrumb',
+    'pageTitle',
+    'isForm',
+    'hookContent',
+    'hookContentPlacement',
+    // required for footer.tpl
+    'contactId',
+  ];
 
   /**
    * Class constructor.
index c781062d364dbec15b54420abd91654614adbdc1..fbb95e2cef2c596755fc1e17a86ad0019176dc08 100644 (file)
@@ -9,7 +9,7 @@
 *}
 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
   {include file="CRM/common/accesskeys.tpl"}
-  {if !empty($contactId)}
+  {if $contactId}
     {include file="CRM/common/contactFooter.tpl"}
   {/if}