Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-10-09-16-14-05
authorKurund Jalmi <kurund@yahoo.com>
Fri, 9 Oct 2015 15:25:22 +0000 (16:25 +0100)
committerKurund Jalmi <kurund@yahoo.com>
Fri, 9 Oct 2015 15:25:22 +0000 (16:25 +0100)
Conflicts:
CRM/Core/Payment/Form.php

1  2 
CRM/Core/BAO/CustomField.php
CRM/Core/Payment.php
CRM/Member/Form/Search.php
distmaker/dists/common.sh

Simple merge
index 3c8a67637cd0a16d6f43e0f02a91637f4318b4e4,0051dc4cf5a14996f2a2636d636affa023585119..8bc65f8af2c98d71efe4531b86b33f62d51b5b49
@@@ -83,36 -71,48 +83,48 @@@ abstract class CRM_Core_Payment 
    protected $_paymentProcessor;
  
    /**
 -   * Singleton function used to manage this object.
 +   * Base url of the calling form.
     *
 -   * We will migrate to calling Civi\Payment\System::singleton()->getByProcessor($paymentProcessor)
 -   * & Civi\Payment\System::singleton()->getById($paymentProcessor) directly as the main access methods & work
 -   * to remove this function all together
 +   * This is used for processors that need to return the browser back to the CiviCRM site.
     *
 -   * @param string $mode
 -   *   The mode of operation: live or test.
 -   * @param array $paymentProcessor
 -   *   The details of the payment processor being invoked.
 -   * @param object $paymentForm
 -   *   Deprecated - avoid referring to this if possible. If you have to use it document why as this is scary interaction.
 -   * @param bool $force
 -   *   Should we force a reload of this payment object.
 +   * @var string
 +   */
 +  protected $baseReturnUrl;
 +
 +  /**
 +   * Set Base return URL.
     *
 -   * @return CRM_Core_Payment
 -   * @throws \CRM_Core_Exception
 +   * @param string $url
 +   *   Url of site to return browser to.
     */
 -  public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
 -    // make sure paymentProcessor is not empty
 -    // CRM-7424
 -    if (empty($paymentProcessor)) {
 -      return CRM_Core_DAO::$_nullObject;
 -    }
 -    //we use two lines because we can't remove the '&singleton' without risking breakage
 -    //of extension classes that extend this one
 -    $object = Civi\Payment\System::singleton()->getByProcessor($paymentProcessor);
 -    return $object;
 +  public function setBaseReturnUrl($url) {
 +    $this->baseReturnUrl = $url;
 +  }
 +
 +  /**
 +   * Opportunity for the payment processor to override the entire form build.
 +   *
 +   * @param CRM_Core_Form $form
 +   *
 +   * @return bool
 +   *   Should form building stop at this point?
 +   */
 +  public function buildForm(&$form) {
 +    return FALSE;
    }
  
+   /**
+    * Opportunity for the payment processor to override the entire form build.
+    *
+    * @param CRM_Core_Form $form
+    *
+    * @return bool
+    *   Should form building stop at this point?
+    */
+   public function buildForm(&$form) {
+     return FALSE;
+   }
    /**
     * Log payment notification message to forensic system log.
     *
Simple merge
Simple merge