From: eileen Date: Tue, 9 Jun 2020 19:50:31 +0000 (+1200) Subject: Remove unreachable lines X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ebe673d07d6aa13c09bf86ac8ea9c9a027c2fdc0;p=civicrm-core.git Remove unreachable lines --- diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 03961d953e..c927be1aff 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1821,8 +1821,8 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND if ($contributionRecurID) { $memParams['contribution_recur_id'] = $contributionRecurID; } - // @todo stop passing $ids - it is empty - $membership = self::create($memParams, $ids); + + $membership = self::create($memParams); return [$membership, $renewalMode, $dates]; } @@ -1852,12 +1852,6 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND if (!empty($membershipSource)) { $currentMembership['source'] = $membershipSource; } - else { - $currentMembership['source'] = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_Membership', - $currentMembership['id'], - 'source' - ); - } if (!empty($currentMembership['id'])) { $ids['membership'] = $currentMembership['id']; @@ -1910,10 +1904,6 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND } $memParams['membership_activity_status'] = ($pending || $isPayLater) ? 'Scheduled' : 'Completed'; } - //CRM-4555 - if ($pending) { - $updateStatusId = array_search('Pending', $allStatus); - } } else { // NEW Membership diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 894f701230..265a72a943 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -782,8 +782,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { if ($contributionRecurID) { $memParams['contribution_recur_id'] = $contributionRecurID; } - // @todo stop passing $ids - it is empty - return CRM_Member_BAO_Membership::create($memParams, $ids); + return CRM_Member_BAO_Membership::create($memParams); } // Check and fix the membership if it is STALE