CRM-13740: enforce https when necessary, on ->extensionsURL.
authorMathieu Lutfy <mathieu@bidon.ca>
Mon, 11 Nov 2013 15:00:27 +0000 (10:00 -0500)
committerMathieu Lutfy <mathieu@bidon.ca>
Mon, 11 Nov 2013 15:00:27 +0000 (10:00 -0500)
CRM/Utils/System.php

index 4a1eb20c937934252acdb4f5c1aa523d2be7a846..3883d6a744f89acb3da02fb23987d70564508924 100644 (file)
@@ -469,10 +469,13 @@ class CRM_Utils_System {
    */
   static function mapConfigToSSL() {
     $config = CRM_Core_Config::singleton();
-    $config->userFrameworkResourceURL = str_replace('http://', 'https://',
-      $config->userFrameworkResourceURL
-    );
+    $config->userFrameworkResourceURL = str_replace('http://', 'https://', $config->userFrameworkResourceURL);
     $config->resourceBase = $config->userFrameworkResourceURL;
+
+    if (! empty($config->extensionsURL)) {
+      $config->extensionsURL = str_replace('http://', 'https://', $config->extensionsURL);
+    }
+
     return $config->userSystem->mapConfigToSSL();
   }