From 42f91903875485017997169e232a0f565ec92e2e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 15 Aug 2014 17:21:19 -0700 Subject: [PATCH] CRM_Contribute_Page_ContributionPage - Campaign IDs Fix for case where count()==1. Simplify. --- CRM/Contribute/Page/ContributionPage.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index d0b0dbaf68..1d891c9c02 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -602,12 +602,9 @@ ORDER BY title asc } $campaignIds = $this->getCampaignIds(); - if (count($campaignIds) > 1) { + if (count($campaignIds) >= 1) { $clauses[] = '( campaign_id IN ( ' . implode(' , ', $campaignIds) . ' ) )'; } - elseif (count($campaignIds) > 1) { - $clauses[] = '( campaign_id = ' . $campaignIds[0] . ')'; - } if (empty($clauses)) { // Let template know if user has run a search or not -- 2.25.1