From d40167a826e7d5069ada8d8444d2716228a8c7c5 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 11 Jul 2021 21:17:20 -0400 Subject: [PATCH] Fix undefined tpl vars --- CRM/Admin/Page/Access.php | 8 ++------ templates/CRM/ACL/Form/WordPress/Permissions.tpl | 2 +- templates/CRM/Contact/Form/Search/ResultTasks.tpl | 2 +- templates/CRM/Contact/Form/Selector.tpl | 6 +++--- templates/CRM/Custom/Form/Group.tpl | 2 +- templates/CRM/common/pagerAToZ.tpl | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CRM/Admin/Page/Access.php b/CRM/Admin/Page/Access.php index b7d3f346ca..7415870fa9 100644 --- a/CRM/Admin/Page/Access.php +++ b/CRM/Admin/Page/Access.php @@ -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(); } diff --git a/templates/CRM/ACL/Form/WordPress/Permissions.tpl b/templates/CRM/ACL/Form/WordPress/Permissions.tpl index 8f76c03fbb..1c5e71ea5b 100644 --- a/templates/CRM/ACL/Form/WordPress/Permissions.tpl +++ b/templates/CRM/ACL/Form/WordPress/Permissions.tpl @@ -38,7 +38,7 @@ {$row.label} - {if $row.desc} + {if !empty($row.desc)}
{$row.desc} {/if} diff --git a/templates/CRM/Contact/Form/Search/ResultTasks.tpl b/templates/CRM/Contact/Form/Search/ResultTasks.tpl index 28ca892fa1..79bcf3fc58 100644 --- a/templates/CRM/Contact/Form/Search/ResultTasks.tpl +++ b/templates/CRM/Contact/Form/Search/ResultTasks.tpl @@ -39,7 +39,7 @@ diff --git a/templates/CRM/Contact/Form/Selector.tpl b/templates/CRM/Contact/Form/Selector.tpl index 0641bebefb..68b9fcd39d 100644 --- a/templates/CRM/Contact/Form/Selector.tpl +++ b/templates/CRM/Contact/Form/Selector.tpl @@ -23,10 +23,10 @@ {/if} {foreach from=$columnHeaders item=header} @@ -78,7 +78,7 @@ {$row.status} {/if} - + {if $action eq 512 or $action eq 256} {if !empty($columnHeaders.street_address)} diff --git a/templates/CRM/Custom/Form/Group.tpl b/templates/CRM/Custom/Form/Group.tpl index c371d06f9b..e03c9e299e 100644 --- a/templates/CRM/Custom/Form/Group.tpl +++ b/templates/CRM/Custom/Form/Group.tpl @@ -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} {/if} -{$initHideBlocks} +{if !empty($initHideBlocks)}{$initHideBlocks}{/if} {literal}
- {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} - {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} {$row.contact_type}{if $row.is_deleted}{/if}{$row.sort_name}{if $row.is_deleted}{/if}{if !empty($row.is_deleted)}{/if}{$row.sort_name}{if !empty($row.is_deleted)}{/if}{$row.street_address|mb_truncate:22:"...":true}{privacyFlag field=do_not_mail condition=$row.do_not_mail}