Merge remote-tracking branch 'origin/4.4' into 4.4-4.5-2014-09-14-13-58-42
authorTim Otten <totten@civicrm.org>
Sun, 14 Sep 2014 18:16:13 +0000 (14:16 -0400)
committerTim Otten <totten@civicrm.org>
Sun, 14 Sep 2014 18:16:13 +0000 (14:16 -0400)
Conflicts:
CRM/Contact/Page/AJAX.php
CRM/Core/BAO/CustomField.php
CRM/Event/Form/Registration/Register.php

1  2 
CRM/Contact/Page/AJAX.php
api/v3/Contribution.php
templates/CRM/common/checkUsernameAvailable.tpl
templates/CRM/common/footer.tpl

index 8473a71c0103b095d9f203fdb308a4ffbf45c67e,ddf9e41ed5e4e27425daf1efda2d760f9b8f4c50..242eb75c83902708c841284a853153466b2c1688
   * This class contains all contact related functions that are called using AJAX (jQuery)
   */
  class CRM_Contact_Page_AJAX {
+   /**
+    * When a user chooses a username, CHECK_USERNAME_TTL
+    * is the time window in which they can check usernames
+    * (without reloading the overall form).
+    */
+   const CHECK_USERNAME_TTL = 10800; // 3hr; 3*60*60
+   const AUTOCOMPLETE_TTL = 21600; // 6hr; 6*60*60
 +  /**
 +   * @deprecated
 +   */
    static function getContactList() {
      // if context is 'customfield'
      if (CRM_Utils_Array::value('context', $_GET) == 'customfield') {
@@@ -601,8 -667,11 +621,11 @@@ ORDER BY sort_name "
     *  Function to get email address of a contact
     */
    static function getContactEmail() {
 -    if (CRM_Utils_Array::value('contact_id', $_REQUEST)) {
 +    if (!empty($_REQUEST['contact_id'])) {
        $contactID = CRM_Utils_Type::escape($_REQUEST['contact_id'], 'Positive');
+       if (!CRM_Contact_BAO_Contact_Permission::allow($contactID, CRM_Core_Permission::EDIT)) {
+         return;
+       }
        list($displayName,
          $userEmail
        ) = CRM_Contact_BAO_Contact_Location::getEmailDetails($contactID);
index 67f8ba8c310eb4bbd09ee97d841ec46790b13237,1385765a32f558163db74ed1d207fc1fb6d55b3a..a873073d85f434d040aa29970300fd545f6c8081
@@@ -300,10 -295,9 +300,10 @@@ function civicrm_api3_contribution_tran
        return CRM_Core_Error::createApiError($last_error['message']);
      }
    }
+   $params['payment_instrument_id'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', $paymentProcessor['payment_processor_type_id'], 'payment_type') == 1 ? 'Credit Card' : 'Debit Card';
    return civicrm_api('contribution', 'create', $params);
  }
 +
  /**
   * Send a contribution confirmation (receipt or invoice)
   * The appropriate online template will be used (the existence of related objects
Simple merge