(dev/core#4536) Fix 'Primary Membership' filter options in Membership Details report
authoryashodha <yashodha@cividesk.com>
Fri, 25 Aug 2023 12:14:30 +0000 (17:44 +0530)
committeryashodha <yashodha@cividesk.com>
Fri, 25 Aug 2023 12:14:30 +0000 (17:44 +0530)
CRM/Report/Form/Member/Detail.php

index 9cc87fc1e7a537927f5b15537bbe58bf505e9e31..8b90e2df005a609a827f8223266caea9a9cc02f1 100644 (file)
@@ -379,18 +379,13 @@ HERESQL;
     }
   }
 
-  public function getOperationPair($type = "string", $fieldName = NULL) {
+  public function getOperationPair($type = 'string', $fieldName = NULL) {
     //re-name IS NULL/IS NOT NULL for clarity
     if ($fieldName === 'owner_membership_id') {
       $result = [];
+      $result[''] = ts('Any');
       $result['nll'] = ts('Primary members only');
       $result['nnll'] = ts('Non-primary members only');
-      $options = parent::getOperationPair($type, $fieldName);
-      foreach ($options as $key => $label) {
-        if (!array_key_exists($key, $result)) {
-          $result[$key] = $label;
-        }
-      }
     }
     else {
       $result = parent::getOperationPair($type, $fieldName);