Merge pull request #15326 from totten/master-headfoot-2
[civicrm-core.git] / CRM / Member / Page / DashBoard.php
index 13510225ec557d7f9d59cda997d302884ee7dcb1..d44ce85c25fb9ca6bb37e7ddbddd1a647270d81a 100644 (file)
@@ -1,34 +1,18 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 5                                                  |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ | Copyright CiviCRM LLC. All rights reserved.                        |
  |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
- |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
  * $Id$
  *
  */
@@ -181,84 +165,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',
@@ -306,65 +212,38 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page {
 
     $totalCount['premonth']['new'] = array(
       'count' => $newCountPreMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=1&dateLow=$preMonth&dateHigh=$preMonthEnd"
-      //),
     );
 
     $totalCount['premonth']['renew'] = array(
       'count' => $renewCountPreMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=2&dateLow=$preMonth&dateHigh=$preMonthEnd"
-      //),
     );
 
     $totalCount['premonth']['total'] = array(
       'count' => $totalCountPreMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=3&dateLow=$preMonth&dateHigh=$preMonthEnd"
-      //),
     );
 
     $totalCount['month']['new'] = array(
       'count' => $newCountMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=1&dateLow=$monthStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['month']['renew'] = array(
       'count' => $renewCountMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=2&dateLow=$monthStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['month']['total'] = array(
       'count' => $totalCountMonth,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=3&dateLow=$monthStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['year']['new'] = array(
       'count' => $newCountYear,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=1&dateLow=$yearStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['year']['renew'] = array(
       'count' => $renewCountYear,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=2&dateLow=$yearStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['year']['total'] = array(
       'count' => $totalCountYear,
-      //'url' => CRM_Utils_System::url('civicrm/activity/search',
-      //  "reset=1&force=1&signupType=3&dateLow=$yearStart&dateHigh=$ymd"
-      //),
     );
 
     $totalCount['current']['total'] = array(