Remove long block of commented out code from 4 years ago
authoreileen <emcnaughton@wikimedia.org>
Sun, 17 Feb 2019 05:26:21 +0000 (18:26 +1300)
committereileen <emcnaughton@wikimedia.org>
Sun, 17 Feb 2019 05:26:21 +0000 (18:26 +1300)
CRM/Member/Page/DashBoard.php

index 13510225ec557d7f9d59cda997d302884ee7dcb1..27ca65730cb46336533aa47b1dbf96d086a78c1f 100644 (file)
@@ -181,84 +181,6 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page {
     $status = CRM_Member_BAO_MembershipStatus::getMembershipStatusCurrent();
     $status = implode(',', $status);
 
-    /*@codingStandardsIgnoreStart
-     Disabled for lack of appropriate search
-
-       The Membership search isn't able to properly filter by join or renewal events.
-       Until that works properly, the subtotals shouldn't get links.
-
-    foreach ($membershipSummary as $typeID => $details) {
-      foreach ($details as $key => $value) {
-        switch ($key) {
-          case 'premonth':
-            $membershipSummary[$typeID][$key]['new']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&join=$preMonth&joinEnd=$preMonthEnd&start=$preMonth&end=$preMonthEnd");
-            $membershipSummary[$typeID][$key]['renew']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&joinEnd=$prePreMonthEnd&start=$preMonth&end=$preMonthEnd");
-            $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$preMonth&end=$preMonthEnd");
-            break;
-
-          case 'month':
-            $membershipSummary[$typeID][$key]['new']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&join=$monthStart&joinEnd=$ymd&start=$monthStart&end=$ymd");
-            $membershipSummary[$typeID][$key]['renew']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&joinEnd=$preMonthStart&start=$monthStart&end=$ymd");
-            $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$monthStart&end=$ymd");
-            break;
-
-          case 'year':
-            $membershipSummary[$typeID][$key]['new']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&join=$yearStart&joinEnd=$ymd&start=$yearStart&end=$ymd");
-            $membershipSummary[$typeID][$key]['renew']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&joinEnd=$preYearStart&start=$yearStart&end=$ymd");
-            $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$yearStart&end=$ymd");
-            break;
-
-          case 'current':
-            $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID");
-            break;
-
-          case 'total':
-            if (!$isCurrentMonth) {
-              $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search',
-                "reset=1&force=1&start=&end=$ymd&status=$status&type=$typeID"
-              );
-            }
-            else {
-              $membershipSummary[$typeID][$key]['total']['url'] = CRM_Utils_System::url('civicrm/member/search',
-                "reset=1&force=1&status=$status"
-              );
-            }
-            break;
-
-          //LCD add owner urls
-
-          case 'premonth_owner':
-            $membershipSummary[$typeID][$key]['premonth_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$preMonth&end=$preMonthEnd&owner=1");
-            break;
-
-          case 'month_owner':
-            $membershipSummary[$typeID][$key]['month_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$monthStart&end=$ymd&owner=1");
-            break;
-
-          case 'year_owner':
-            $membershipSummary[$typeID][$key]['year_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&start=$yearStart&end=$ymd&owner=1");
-            break;
-
-          case 'current_owner':
-            $membershipSummary[$typeID][$key]['current_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&owner=1");
-            break;
-
-          case 'total_owner':
-            if (!$isCurrentMonth) {
-              $membershipSummary[$typeID][$key]['total_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&start=&end=$ymd&status=$status&type=$typeID&owner=1");
-            }
-            else {
-              $membershipSummary[$typeID][$key]['total_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&owner=1");
-            }
-            break;
-          //LCD end
-        }
-      }
-    }
-    @codingStandardsIgnoreEnd */
-
-    // Temporary replacement for current totals column
-
     foreach ($membershipSummary as $typeID => $details) {
       if (!$isCurrentMonth) {
         $membershipSummary[$typeID]['total']['total']['url'] = CRM_Utils_System::url('civicrm/member/search',