From: Coleman Watts Date: Wed, 14 Jan 2015 02:51:08 +0000 (-0500) Subject: Merge branch '4.5' into master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=29d98e1314e345f1b9044f5359c2d0a67f380d21;p=civicrm-core.git Merge branch '4.5' into master Conflicts: CRM/Core/Payment/BaseIPN.php tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php tests/phpunit/WebTest/Event/AddPricesetTest.php tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php --- 29d98e1314e345f1b9044f5359c2d0a67f380d21 diff --cc CRM/Core/Payment/BaseIPN.php index 4f3ca26bb6,6aa92b45f1..c3e89e9fda --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@@ -640,14 -594,12 +640,14 @@@ LIMIT 1;" // From a lot of code reading /debugging I'm still not sure the intent WRT first & subsequent payments in this code // it would be good if someone added some comments or refactored this if ($contribution->id) { - $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); - if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && - $input['prevContribution']->contribution_status_id == array_search('Pending', $contributionStatuses))) { - $input['payment_processor'] = $paymentProcessorId; + $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( + 'labelColumn' => 'name', + 'flip' => 1 + )); - if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && -$input['prevContribution']->contribution_status_id == $contributionStatuses['Pending'])) { ++ if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && $input['prevContribution']->contribution_status_id == $contributionStatuses['Pending'])) { + $input['payment_processor'] = $paymentProcessorId; } - $input['contribution_status_id'] = array_search('Completed', $contributionStatuses); + $input['contribution_status_id'] = $contributionStatuses['Completed']; $input['total_amount'] = $input['amount']; $input['contribution'] = $contribution; $input['financial_type_id'] = $contribution->financial_type_id; diff --cc tests/phpunit/WebTest/Event/AddPricesetTest.php index 0da4aba3ef,6182d763fe..4f54d09b14 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@@ -263,10 -260,11 +263,10 @@@ class WebTest_Event_AddPricesetTest ext $this->click('link=Fees'); $this->waitForElementPresent('_qf_Fee_upload_done-bottom'); $this->click('CIVICRM_QFID_1_is_monetary'); - $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']"); - $this->select('financial_type_id', 'label=Event Fee'); + $this->click("xpath=//tbale[@id='paymentProcessor']/tbody/tr[1]/td[2]/label[text()='$processorName']"); + $this->select('financial_type_id','label=Event Fee'); $this->select('price_set_id', 'label=' . $setTitle); - // intro text for registration page $registerIntro = 'Fill in all the fields below and click Continue.'; $this->clickLink('_qf_Fee_upload-bottom', 'link=Online Registration', FALSE);