Skip to content
Snippets Groups Projects
Commit a0713e70 authored by monishdeb's avatar monishdeb
Browse files

CRM-13937 fix - Lifetime memberships created with a start date older than 3...

CRM-13937 fix - Lifetime memberships created with a start date older than 3 months ago have a status of expired.

http://issues.civicrm.org/jira/browse/CRM-13937
parent 9c1105ba
Branches
Tags
No related merge requests found
......@@ -236,21 +236,22 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
$statusDate = CRM_Utils_Date::customFormat($statusDate, '%Y%m%d');
}
$startDate = CRM_Utils_Date::customFormat($startDate, '%Y%m%d');
$endDate = CRM_Utils_Date::customFormat($endDate, '%Y%m%d');
$joinDate = CRM_Utils_Date::customFormat($joinDate, '%Y%m%d');
$dates = array('start', 'end', 'join');
$events = array('start', 'end');
foreach ($dates as $dat) {
if (${$dat . 'Date'}) {
if (${$dat . 'Date'} && ${$dat . 'Date'} != "null") {
${$dat . 'Date'} = CRM_Utils_Date::customFormat(${$dat . 'Date'}, '%Y%m%d');
${$dat . 'Year'} = substr(${$dat . 'Date'}, 0, 4);
${$dat . 'Month'} = substr(${$dat . 'Date'}, 4, 2);
${$dat . 'Day'} = substr(${$dat . 'Date'}, 6, 2);
}
else {
${$dat . 'Date'} = '';
}
}
//fix for CRM-3570, if we have statuses with is_admin=1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment