CRM_Cxn_BAO_Cxn::createRegistrationClient - Support proxies
authorTim Otten <totten@civicrm.org>
Sat, 5 Dec 2015 04:58:34 +0000 (20:58 -0800)
committerTim Otten <totten@civicrm.org>
Sun, 6 Dec 2015 01:14:30 +0000 (17:14 -0800)
CRM/Cxn/BAO/Cxn.php

index 16d5fe25f933ae4ef952aa30f5b39eacac42ee46..9e855ef7124c947737be904164e9cdf0143a4efd 100644 (file)
@@ -140,7 +140,9 @@ class CRM_Cxn_BAO_Cxn extends CRM_Cxn_DAO_Cxn {
    */
   public static function createRegistrationClient() {
     $cxnStore = new \CRM_Cxn_CiviCxnStore();
-    $client = new \Civi\Cxn\Rpc\RegistrationClient($cxnStore, \CRM_Cxn_BAO_Cxn::getSiteCallbackUrl());
+    $viaPort = defined('CIVICRM_CXN_VIA') ? CIVICRM_CXN_VIA : NULL;
+    $client = new \Civi\Cxn\Rpc\RegistrationClient(
+      $cxnStore, \CRM_Cxn_BAO_Cxn::getSiteCallbackUrl(), $viaPort);
     $client->setLog(new \CRM_Utils_SystemLogger());
     $client->setCertValidator(self::createCertificateValidator());
     $client->setHttp(CRM_Cxn_CiviCxnHttp::singleton());