CRM-14971 - Contact image URLs should go through WP frontend
authorTim Otten <totten@civicrm.org>
Fri, 11 Jul 2014 01:58:45 +0000 (18:58 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 11 Jul 2014 01:58:45 +0000 (18:58 -0700)
----------------------------------------
* CRM-14971: Contact image URLs broken in WordPress after upgrade to 4.4.6
  https://issues.civicrm.org/jira/browse/CRM-14971

CRM/Contact/BAO/Contact.php
CRM/Upgrade/Incremental/php/FourFour.php

index 07f9ae2c0e932d147d45fb34dde014110985b9db..e7050a73d80c10387f0c8f6d766d68f87292b42e 100644 (file)
@@ -943,7 +943,7 @@ WHERE id={$id}; ";
 
     if (in_array($params[$imageIndex]['type'], $mimeType)) {
       $photo = basename($params[$imageIndex]['name']);
-      $params[$imageIndex] =  CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE);
+      $params[$imageIndex] =  CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE, NULL, TRUE, TRUE);
       return TRUE;
     }
     else {
index 58d055ae46a6635939f8df884605c28c75118761..5ef54705abd7bf0918824008de6868d49bedbc91 100644 (file)
@@ -348,7 +348,7 @@ AND image_URL IS NOT NULL
         $config = CRM_Core_Config::singleton();
         $fullpath = $config->customFileUploadDir.$photo;
           if (file_exists($fullpath)){
-            $newimageurl =  CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE);
+            $newimageurl =  CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE, NULL, TRUE, TRUE);
             $sql = 'UPDATE civicrm_contact SET image_url=%1 WHERE id=%2';
             $params = array(
               1 => array($newimageurl, 'String'),