Merge branch '4.5' into master
authorColeman Watts <coleman@civicrm.org>
Wed, 14 Jan 2015 02:51:08 +0000 (21:51 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 14 Jan 2015 02:51:08 +0000 (21:51 -0500)
Conflicts:
CRM/Core/Payment/BaseIPN.php
tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php

1  2 
CRM/Core/Payment/BaseIPN.php
tests/phpunit/WebTest/Case/CaseCustomFieldsTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Event/MultiprofileEventTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index 4f3ca26bb60e515f1cc12013b7f468f16765b0cf,6aa92b45f14753a0350726bfda3972b21c02b729..c3e89e9fda5acc24d1d41a25018f847cf6133f4f
@@@ -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;
index 0da4aba3efa76f46f8237bfacb2ee1a57cd539fd,6182d763fe47b1896c7617aa007f65e6c941ea4d..4f54d09b1473407c051b1a1754a90b71357f2fb6
@@@ -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);