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 {
$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'),