Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-09-15-10-14-22
authorKurund Jalmi <kurund@yahoo.com>
Tue, 15 Sep 2015 06:22:41 +0000 (11:52 +0530)
committerKurund Jalmi <kurund@yahoo.com>
Tue, 15 Sep 2015 06:22:41 +0000 (11:52 +0530)
Conflicts:
CRM/Admin/Form/Setting/Localization.php
CRM/Event/BAO/Query.php
CRM/Export/BAO/Export.php
CRM/Financial/Page/AJAX.php
templates/CRM/Event/Form/Registration/Register.tpl
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/api/v3/ContactTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

22 files changed:
1  2 
CRM/Campaign/BAO/Petition.php
CRM/Contribute/BAO/Contribution.php
CRM/Core/I18n.php
CRM/Core/Payment/ProcessorForm.php
CRM/Event/Form/Registration/Confirm.php
CRM/Financial/Page/AJAX.php
CRM/Report/Form.php
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/Repeat.php
CRM/Report/Form/Contribute/SoftCredit.php
CRM/Report/Form/Contribute/Summary.php
CRM/Report/Form/Event/ParticipantListing.php
CRM/Report/Form/Member/Detail.php
CRM/Utils/Mail/EmailProcessor.php
api/v3/MembershipType.php
templates/CRM/Core/BillingBlock.tpl
templates/CRM/Event/Form/Registration/AdditionalParticipant.tpl
templates/CRM/Event/Form/Registration/DisplayProfile.tpl
templates/CRM/Event/Form/Registration/Register.tpl
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/api/v3/ContactTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

Simple merge
index c81a0e393b2b84131ebdea4cb469eedf9f6a24ec,c4f871113bebffbe6d7b84ebf2e8cea63c5cec56..f2f5c4b86e894cdae592e8c6d99d7d82eb2eeb44
@@@ -170,18 -175,11 +173,14 @@@ class CRM_Contribute_BAO_Contribution e
  
      $contribution->id = $contributionID;
  
 -    if (!CRM_Utils_Rule::currencyCode($contribution->currency)) {
 -      $config = CRM_Core_Config::singleton();
 -      $contribution->currency = $config->defaultCurrency;
 +    if (empty($contribution->id)) {
 +      // (only) on 'create', make sure that a valid currency is set (CRM-16845)
 +      if (!CRM_Utils_Rule::currencyCode($contribution->currency)) {
 +        $config = CRM_Core_Config::singleton();
 +        $contribution->currency = $config->defaultCurrency;
 +      }
      }
  
-     if ($contributionID && $setPrevContribution) {
-       $params['prevContribution'] = self::getValues(array('id' => $contributionID), CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullArray);
-     }
      $result = $contribution->save();
  
      // Add financial_trxn details as part of fix for CRM-4724
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index cc9bcab6b623fce27085802ca4316fbac5fece77,6261637e4073e5d044c754f0a6e7e6df9805c9dd..63628635e2b427a620366d8f0f4c27467115252b
   +--------------------------------------------------------------------+
  *}
  {* Callback snippet: Load payment processor *}
 -{if $snippet}
 -  {include file="CRM/Core/BillingBlock.tpl"}
 -  <div id="paypalExpress">
 -    {* Put PayPal Express button after customPost block since it's the submit button in this case. *}
 -    {if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}
 -      {assign var=expressButtonName value='_qf_Register_upload_express'}
 -      <fieldset class="crm-public-form-item crm-group payPalExpress-group">
 -        <legend>{ts}Checkout with PayPal{/ts}</legend>
 -        <div class="description">{ts}Click the PayPal button to continue.{/ts}</div>
 -        <div>{$form.$expressButtonName.html} <span style="font-size:11px; font-family: Arial, Verdana;">Checkout securely.  Pay without sharing your financial information. </span>
 -        </div>
 -      </fieldset>
 -    {/if}
 -  </div>
 -{else}
    {if $action & 1024}
      {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"}
    {/if}
@@@ -66,8 -80,8 +65,8 @@@
      {/if}
  
      {if $form.additional_participants.html}
-       <div class="crm-section additional_participants-section" id="noOfparticipants">
+       <div class="crm-public-form-item crm-section additional_participants-section" id="noOfparticipants">
 -        <div class="label">{$form.additional_participants.label}</div>
 +        <div class="label">{$form.additional_participants.label} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span></div>
          <div class="content">
            {$form.additional_participants.html}{if $contact_id || $contact_id == NULL} &nbsp; ({ts}including yourself{/ts}){/if}
            <br/>
        </fieldset>
      {/if}
  
 -    {if $form.payment_processor.label}
 +    {if $form.payment_processor_id.label}
-       <fieldset class="crm-group payment_options-group" style="display:none;">
+       <fieldset class="crm-public-form-item crm-group payment_options-group" style="display:none;">
          <legend>{ts}Payment Options{/ts}</legend>
 -        <div class="crm-public-form-item crm-section payment_processor-section">
 -          <div class="label">{$form.payment_processor.label}</div>
 -          <div class="content">{$form.payment_processor.html}</div>
 +        <div class="crm-section payment_processor-section">
 +          <div class="label">{$form.payment_processor_id.label}</div>
 +          <div class="content">{$form.payment_processor_id.html}</div>
            <div class="clear"></div>
          </div>
        </fieldset>
Simple merge
index 6001554cb2631dfad73376998ab71f856bca9a34,9308064d271fb1386ff5da514ddeb1bfc315fb2e..90be85cfcf8e354bee2d1060a7ffd37e693d4d40
@@@ -1162,18 -1153,10 +1162,26 @@@ class api_v3_SyntaxConformanceTest exte
          case CRM_Utils_Type::T_TEXT:
          case CRM_Utils_Type::T_LONGTEXT:
          case CRM_Utils_Type::T_EMAIL:
 -          $entity[$fieldName] = substr('New String', 0, CRM_Utils_Array::Value('maxlength', $specs, 100));
 -          // typecast with array to satisfy changes made in CRM-13160
 -          if ($entityName == 'MembershipType' && in_array($fieldName, array('relationship_type_id', 'relationship_direction'))) {
 -            $entity[$fieldName] = (array) $entity[$fieldName];
 +          if ($fieldName == 'form_values' && $entityName == 'SavedSearch') {
 +            // This is a hack for the SavedSearch API.
 +            // It expects form_values to be an array.
 +            // If you want to fix this, you should definitely read this forum
 +            // post.
 +            // http://forum.civicrm.org/index.php/topic,33990.0.html
 +            // See also my question on the CiviCRM Stack Exchange:
 +            // https://civicrm.stackexchange.com/questions/3437
 +            $entity[$fieldName] = array('sort_name' => "SortName2");
 +          }
 +          else {
 +            $entity[$fieldName] = substr('New String', 0, CRM_Utils_Array::Value('maxlength', $specs, 100));
++            // typecast with array to satisfy changes made in CRM-13160
++            if ($entityName == 'MembershipType' && in_array($fieldName, array(
++                'relationship_type_id',
++                'relationship_direction',
++              ))
++            ) {
++              $entity[$fieldName] = (array) $entity[$fieldName];
++            }
            }
            break;