Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-06-01-20-54-24
authorkurund <kurund@civicrm.org>
Sun, 1 Jun 2014 15:33:12 +0000 (21:03 +0530)
committerkurund <kurund@civicrm.org>
Sun, 1 Jun 2014 15:33:12 +0000 (21:03 +0530)
Conflicts:
CRM/Member/Form/Membership.php
CRM/Upgrade/Incremental/php/FourFour.php
api/api.php
tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.module
tools/drupal/modules/ccrm_extensionvalidation/ccrm_extensionvalidation/ccrm_extensionvalidation.version.inc
tools/drupal/modules/civicrm_regsite/civicrm_regsite.module
tools/drupal/modules/civicrm_regsite/templates/CRM/Profile/Form/15/Edit.tpl
tools/drupal/modules/civicrm_regsite/templates/CRM/Profile/Form/Survey/Edit.tpl
tools/drupal/modules/civicrm_regsite/templates/CRM/Profile/Page/Regsite/Dynamic.tpl
tools/drupal/modules/civicrm_regsite/templates/CRM/Profile/Page/Survey/Dynamic.tpl
tools/drupal/modules/extdir/extdir.pages.inc

13 files changed:
1  2 
CRM/Contact/Import/Parser/Contact.php
CRM/Contact/Selector.php
CRM/Core/BAO/Address.php
CRM/Core/Payment/AuthorizeNet.php
CRM/Export/BAO/Export.php
CRM/Logging/Differ.php
CRM/Member/Form/Membership.php
CRM/Report/Form/Contribute/History.php
CRM/Report/Form/Pledge/Summary.php
CRM/Upgrade/Incremental/php/FourFour.php
CRM/Utils/REST.php
CRM/Utils/System/Joomla.php
tests/phpunit/CiviTest/CiviSeleniumTestCase.php

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 81dc6d4e4578b21e91e8a0a71d8cb667cd208655,8e98a13c806a25e0b71f83ddac2c85cba16a2b4e..82295ddaba878c7f5bc39f097111ab06a08f9e53
@@@ -1449,19 -1423,11 +1449,19 @@@ WHERE   id IN ( ' . implode(' , ', arra
            $result,
            $this->_contributorContactID,
            $contributionType,
 -          FALSE,
            TRUE,
 -          FALSE
 +          FALSE,
 +          $isTest,
 +          $lineItems
          );
-         $paymentParams['contactID'] = $contactID;
 +
 +        //create new soft-credit record, CRM-13981
 +        $softParams['contribution_id'] = $contribution->id;
 +        $softParams['currency'] = $contribution->currency;
 +        $softParams['amount'] = $contribution->total_amount;
 +        CRM_Contribute_BAO_ContributionSoft::add($softParams);
 +
+         $paymentParams['contactID'] = $this->_contactID;
          $paymentParams['contributionID'] = $contribution->id;
          $paymentParams['contributionTypeID'] = $contribution->financial_type_id;
          $paymentParams['contributionPageID'] = $contribution->contribution_page_id;
Simple merge
index 52080bc2822b916950ad7e5b11259f0cd8566fc1,58d055ae46a6635939f8df884605c28c75118761..876f67b428b9d7ad1d2a3a4f548124d33715f96c
@@@ -331,12 -307,17 +331,20 @@@ ALTER TABLE civicrm_dashboar
      return TRUE;
    }
  
 +  /**
 +   * @param $rev
 +   */
    function upgrade_4_4_6($rev){
-     $minId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(min(id),0) FROM civicrm_contact');
-     $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact');
+     $sql = "SELECT count(*) AS count FROM INFORMATION_SCHEMA.STATISTICS where ".
+       "INDEX_NAME = 'index_image_url' AND TABLE_NAME = 'civicrm_contact';";
+     $dao = CRM_Core_DAO::executeQuery($sql);
+     $dao->fetch();
 -    if($dao->count < 1) {
++    if ($dao->count < 1) {
+       $sql = "CREATE INDEX index_image_url ON civicrm_contact (image_url);";
+       $dao = CRM_Core_DAO::executeQuery($sql);
+     }
+     $minId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(min(id),0) FROM civicrm_contact WHERE image_URL IS NOT NULL');
+     $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact WHERE image_URL IS NOT NULL');
      for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) {
        $endId = $startId + self::BATCH_SIZE - 1;
        $title = ts('Upgrade image_urls (%1 => %2)', array(1 => $startId, 2 => $endId));
      }
    }
  
 +  /**
 +   * @param CRM_Queue_TaskContext $ctx
 +   * @param $startId
 +   * @param $endId
 +   *
 +   * @return bool
 +   */
    static function upgradeImageUrls(CRM_Queue_TaskContext $ctx, $startId, $endId){
 +    $sql = "CREATE INDEX index_image_url ON civicrm_contact (image_url);";
 +    $dao = CRM_Core_DAO::executeQuery($sql);
++
      $sql = "
  SELECT id, image_url
  FROM civicrm_contact
Simple merge
Simple merge