Skip to content

Commit

Permalink
Merge pull request #26070 from colemanw/noCount
Browse files Browse the repository at this point in the history
Remove unnecessary count() from smarty conditionals
  • Loading branch information
mattwire authored Apr 17, 2023
2 parents b5a1186 + 314bcdf commit 50e195f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/CRM/Form/body.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div>{$form.hidden}</div>
{/if}

{if ($snippet !== 'json') and !$suppressForm and $form.errors !== NULL && count($form.errors) gt 0}
{if ($snippet !== 'json') and !$suppressForm and $form.errors}
<div class="messages crm-error">
<i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i>
{ts}Please correct the following errors in the form fields below:{/ts}
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/common/SectionNav.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+--------------------------------------------------------------------+
*}
{* Navigation template for multi-section Wizards *}
{if count( $category.steps ) > 0}
{if $category.steps}
<div id="wizard-steps">
<ul class="section-list">
{foreach from=$category.steps item=step}
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/common/displaySearchCriteria.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{foreach from=$qill name=sets key=setKey item=orClauses}
{if $smarty.foreach.sets.total > 2}
{* We have multiple criteria sets, so display AND'd items in each set on the same line. *}
{if count($orClauses) gt 0}
{if $orClauses}
<ul>
<li>
{foreach from=$orClauses name=criteria item=item}
Expand Down

0 comments on commit 50e195f

Please sign in to comment.