CRM_Core_BAO_CustomValueTable::store($params['custom'], 'civicrm_activity', $activity->id);
}
- // set permanent cookie to indicate this petition already signed on the computer
+ // Set browser cookie to indicate this petition was already signed.
$config = CRM_Core_Config::singleton();
- setcookie('signed_' . $params['sid'], $activity->id, time() + $this->cookieExpire, $config->userFrameworkBaseURL);
+ $url_parts = parse_url($config->userFrameworkBaseURL);
+ setcookie('signed_' . $params['sid'], $activity->id, time() + $this->cookieExpire, $url_parts['path'], $url_parts['host'], CRM_Utils_System::isSSL());
}
return $activity;
&& isset($activity_id) && is_numeric($activity_id)) {
// set permanent cookie to indicate this users email address now confirmed
$config = CRM_Core_Config::singleton();
+ $url_parts = parse_url($config->userFrameworkBaseURL);
setcookie("confirmed_{$petition_id}",
$activity_id,
time() + $this->cookieExpire,
- $config->userFrameworkBaseURL
+ $url_parts['path'],
+ $url_parts['host'],
+ CRM_Utils_System::isSSL()
);
return TRUE;
}