Skip to content

Commit

Permalink
Merge pull request #7119 from seamuslee001/CRM-17471-4.6
Browse files Browse the repository at this point in the history
Crm 17471 Fix situation where search options not updating for change in membership status
  • Loading branch information
davecivicrm committed Nov 3, 2015
2 parents 6fcea8a + 9d4d481 commit 3a0725b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CRM/Member/BAO/MembershipStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public static function add(&$params, $ids = array()) {
$membershipStatus->id = $id;

$membershipStatus->save();
CRM_Member_PseudoConstant::flush('membershipStatus');
return $membershipStatus;
}

Expand Down Expand Up @@ -207,6 +208,7 @@ public static function del($membershipStatusId) {
$membershipStatus = new CRM_Member_DAO_MembershipStatus();
$membershipStatus->id = $membershipStatusId;
$membershipStatus->delete();
CRM_Member_PseudoConstant::flush('membershipStatus');
$membershipStatus->free();
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public static function defaultReturnProperties(
* @param CRM_Core_Form $form
*/
public static function buildSearchForm(&$form) {
$membershipStatus = CRM_Member_PseudoConstant::membershipStatus();
$membershipStatus = CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label', FALSE, FALSE);
$form->add('select', 'membership_status_id', ts('Membership Status(s)'), $membershipStatus, FALSE,
array('id' => 'membership_status_id', 'multiple' => 'multiple', 'class' => 'crm-select2')
);
Expand Down

0 comments on commit 3a0725b

Please sign in to comment.