From: demeritcowboy Date: Mon, 14 Jun 2021 16:55:37 +0000 (-0400) Subject: improve flawed test X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ef79e4f555894a098182a7394b50a6c5d990c37d;p=civicrm-core.git improve flawed test --- diff --git a/CRM/Contact/Form/Search/Custom/FullText.php b/CRM/Contact/Form/Search/Custom/FullText.php index c86d265af9..12b793fa2f 100644 --- a/CRM/Contact/Form/Search/Custom/FullText.php +++ b/CRM/Contact/Form/Search/Custom/FullText.php @@ -316,6 +316,7 @@ WHERE t.table_name = 'Activity' AND $form->assign('limit', self::LIMIT); // set form defaults + $form->assign('table', ''); if (!empty($form->_formValues)) { $defaults = []; diff --git a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl index f2bcfdebb1..7c12f721cc 100644 --- a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl @@ -34,7 +34,8 @@ {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} {/if} -{assign var=table value=$form.table.value.0} +{* @TODO: This is confusing - the variable `table` is already set and used above, and now we set it again to something that is technically different but has the same value, except on a blank form where it doesn't exist, but effectively then is the same value that it already has which is ''. So do we need this line even? *} +{if (isset($form.table.value.0))}{assign var=table value=$form.table.value.0}{/if} {assign var=text value=$form.text.value} {if !empty($summary.Contact) }
diff --git a/templates/CRM/Price/Page/Field.tpl b/templates/CRM/Price/Page/Field.tpl index 88ec508d58..665ab2add5 100644 --- a/templates/CRM/Price/Page/Field.tpl +++ b/templates/CRM/Price/Page/Field.tpl @@ -26,7 +26,8 @@
{/if} -{if $action NEQ 8 and $priceField} +{* priceField is set when e.g. in browse mode *} +{if $action NEQ 8 and !empty($priceField)}