From: Bradley Taylor Date: Sun, 10 Apr 2022 08:09:06 +0000 (+0100) Subject: Ensure deleteURL variable for ContactImage.tpl X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fe8ac0c913e2235767b81d53edf28bd6f059df50;p=civicrm-core.git Ensure deleteURL variable for ContactImage.tpl --- diff --git a/CRM/Contact/Page/View.php b/CRM/Contact/Page/View.php index 180a528c9c..3069497500 100644 --- a/CRM/Contact/Page/View.php +++ b/CRM/Contact/Page/View.php @@ -207,6 +207,9 @@ class CRM_Contact_Page_View extends CRM_Core_Page { // Add links for actions menu self::addUrls($this, $this->_contactId); $this->assign('groupOrganizationUrl', $this->getGroupOrganizationUrl($contactType)); + + // Assign deleteURL variable, used as part of ContactImage.tpl + self::$_template->ensureVariablesAreAssigned(['deleteURL']); } /** diff --git a/templates/CRM/Contact/Page/ContactImage.tpl b/templates/CRM/Contact/Page/ContactImage.tpl index a990d7dc89..2a86535258 100644 --- a/templates/CRM/Contact/Page/ContactImage.tpl +++ b/templates/CRM/Contact/Page/ContactImage.tpl @@ -11,7 +11,7 @@
{$imageURL}
- {if $action eq 0 or $action neq 1} + {if $action eq 0 or $action neq 1 and $deleteURL}
{$deleteURL}
{/if} {/crmRegion}