Fix undefined tpl vars
authorColeman Watts <coleman@civicrm.org>
Mon, 12 Jul 2021 01:17:20 +0000 (21:17 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 12 Jul 2021 01:17:20 +0000 (21:17 -0400)
CRM/Admin/Page/Access.php
templates/CRM/ACL/Form/WordPress/Permissions.tpl
templates/CRM/Contact/Form/Search/ResultTasks.tpl
templates/CRM/Contact/Form/Selector.tpl
templates/CRM/Custom/Form/Group.tpl
templates/CRM/common/pagerAToZ.tpl

index b7d3f346caabada77201c1ae6beea39d3b7d6df5..7415870fa999096999ef666cbdd59b9b1b641546 100644 (file)
@@ -25,12 +25,8 @@ class CRM_Admin_Page_Access extends CRM_Core_Page {
    */
   public function run() {
     $urlParams = CRM_Utils_System::getCMSPermissionsUrlParams();
-    if (isset($urlParams['ufAccessURL'])) {
-      $this->assign('ufAccessURL', $urlParams['ufAccessURL']);
-    }
-    if (isset($urlParams['jAccessParams'])) {
-      $this->assign('jAccessParams', $urlParams['jAccessParams']);
-    }
+    $this->assign('ufAccessURL', $urlParams['ufAccessURL'] ?? NULL);
+    $this->assign('jAccessParams', $urlParams['jAccessParams'] ?? NULL);
     return parent::run();
   }
 
index 8f76c03fbb835c985b8a2d8fd7f10151e27d5c8a..1c5e71ea5b6359174e2d8de32fd323e830d45286 100644 (file)
@@ -38,7 +38,7 @@
 
       <td style="height: 2.6em;">
         {$row.label}
-        {if $row.desc}
+        {if !empty($row.desc)}
           <br/><span class="description">{$row.desc}</span>
         {/if}
       </td>
index 28ca892fa15ef6e9a53ce428d62e008b9e6e2e14..79bcf3fc582dbf72010cc0af73c42e489cd0d04d 100644 (file)
@@ -39,7 +39,7 @@
   <table class="form-layout-compressed">
   <tr>
     <td class="font-size12pt" style="width: 30%;">
-        {if $savedSearch.name}{$savedSearch.name} ({ts}smart group{/ts}) - {/if}
+        {if !empty($savedSearch.name)}{$savedSearch.name} ({ts}smart group{/ts}) - {/if}
         {ts count=$pager->_totalItems plural='%count Contacts'}%count Contact{/ts}
     </td>
 
index 0641bebefb7c2ccee8228073c6386074d2ca55a3..68b9fcd39d5ed35f956316ff7e49805f15e3d133 100644 (file)
       {/if}
       {foreach from=$columnHeaders item=header}
         <th scope="col">
-        {if $header.sort}
+        {if !empty($header.sort)}
           {assign var='key' value=$header.sort}
           {$sort->_response.$key.link}
-        {else}
+        {elseif !empty($header.name)}
           {$header.name}
         {/if}
         </th>
@@ -78,7 +78,7 @@
                 {$row.status}</td>
             {/if}
             <td>{$row.contact_type}</td>
-            <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{if $row.is_deleted}<del>{/if}{$row.sort_name}{if $row.is_deleted}</del>{/if}</a></td>
+            <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{if !empty($row.is_deleted)}<del>{/if}{$row.sort_name}{if !empty($row.is_deleted)}</del>{/if}</a></td>
             {if $action eq 512 or $action eq 256}
               {if !empty($columnHeaders.street_address)}
           <td><span title="{$row.street_address|escape}">{$row.street_address|mb_truncate:22:"...":true}{privacyFlag field=do_not_mail condition=$row.do_not_mail}</span></td>
index c371d06f9b708c98ff10ffce1321cfd847491206..e03c9e299ec8a280be194f094eda997149c038e5 100644 (file)
@@ -73,7 +73,7 @@
       {crmButton p='civicrm/admin/custom/group/field' q="action=browse&reset=1&gid=$gid" icon="th-list"}{ts}Custom Fields for this Set{/ts}{/crmButton}
     </div>
 {/if}
-{$initHideBlocks}
+{if !empty($initHideBlocks)}{$initHideBlocks}{/if}
 {literal}
 <script type="text/Javascript">
 CRM.$(function($) {
index c4a4b9323c86c99a77f85df0c2dbc482cd629e58..a24a8f92a45529b68c208d84226a26b7e8a521c6 100644 (file)
@@ -11,7 +11,7 @@
 <div id="alpha-filter">
     <ul>
     {foreach from=$aToZ item=letter}
-        <li {if $letter.class}class="{$letter.class}"{/if}>{$letter.item}</li>
+        <li {if !empty($letter.class)}class="{$letter.class}"{/if}>{$letter.item}</li>
     {/foreach}
     </ul>
 </div>