From 065034510d48b722844b2007f8016ea644bd0cbd Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 10 Jul 2014 18:58:45 -0700 Subject: [PATCH] CRM-14971 - Contact image URLs should go through WP frontend ---------------------------------------- * 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 | 2 +- CRM/Upgrade/Incremental/php/FourFour.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 07f9ae2c0e..e7050a73d8 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -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 { diff --git a/CRM/Upgrade/Incremental/php/FourFour.php b/CRM/Upgrade/Incremental/php/FourFour.php index 58d055ae46..5ef54705ab 100644 --- a/CRM/Upgrade/Incremental/php/FourFour.php +++ b/CRM/Upgrade/Incremental/php/FourFour.php @@ -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'), -- 2.25.1