Skip to content

Commit

Permalink
Fix smarty notices in membership dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
braders committed Jan 29, 2022
1 parent 6005455 commit 3e4e9b7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CRM/Member/Page/DashBoard.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,51 +86,61 @@ public function preProcess() {
$membershipSummary[$key]['premonth']['new'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipJoins($key, $preMonth, $preMonthEnd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['premonth']['renew'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipRenewals($key, $preMonth, $preMonthEnd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['premonth']['total'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $preMonth, $preMonthEnd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['month']['new'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipJoins($key, $monthStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['month']['renew'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipRenewals($key, $monthStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['month']['total'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $monthStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['year']['new'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipJoins($key, $yearStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['year']['renew'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipRenewals($key, $yearStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['year']['total'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $yearStart, $ymd),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['current']['total'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipCount($key, $current),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['total']['total'] = array('count' => CRM_Member_BAO_Membership::getMembershipCount($key, $ymd));
Expand All @@ -139,21 +149,25 @@ public function preProcess() {
$membershipSummary[$key]['premonth_owner']['premonth_owner'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $preMonth, $preMonthEnd, 0, 1),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['month_owner']['month_owner'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $monthStart, $ymd, 0, 1),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['year_owner']['year_owner'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipStarts($key, $yearStart, $ymd, 0, 1),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['current_owner']['current_owner'] = array(
'count' => CRM_Member_BAO_Membership::getMembershipCount($key, $current, 0, 1),
'name' => $value,
'url' => false
);

$membershipSummary[$key]['total_owner']['total_owner'] = array('count' => CRM_Member_BAO_Membership::getMembershipCount($key, $ymd, 0, 1));
Expand Down Expand Up @@ -210,38 +224,47 @@ public function preProcess() {

$totalCount['premonth']['new'] = array(
'count' => $newCountPreMonth,
'url' => false
);

$totalCount['premonth']['renew'] = array(
'count' => $renewCountPreMonth,
'url' => false
);

$totalCount['premonth']['total'] = array(
'count' => $totalCountPreMonth,
'url' => false
);

$totalCount['month']['new'] = array(
'count' => $newCountMonth,
'url' => false
);

$totalCount['month']['renew'] = array(
'count' => $renewCountMonth,
'url' => false
);

$totalCount['month']['total'] = array(
'count' => $totalCountMonth,
'url' => false
);

$totalCount['year']['new'] = array(
'count' => $newCountYear,
'url' => false
);

$totalCount['year']['renew'] = array(
'count' => $renewCountYear,
'url' => false
);

$totalCount['year']['total'] = array(
'count' => $totalCountYear,
'url' => false
);

$totalCount['current']['total'] = array(
Expand Down Expand Up @@ -272,32 +295,38 @@ public function preProcess() {
//LCD add owner values
$totalCount['premonth_owner']['premonth_owner'] = array(
'count' => $totalCountPreMonth_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&start=$preMonth&end=$preMonthEnd&owner=1"),
);

$totalCount['month_owner']['month_owner'] = array(
'count' => $totalCountMonth_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&start=$monthStart&end=$ymd&owner=1"),
);

$totalCount['year_owner']['year_owner'] = array(
'count' => $totalCountYear_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&start=$yearStart&end=$ymd&owner=1"),
);

$totalCount['current_owner']['current_owner'] = array(
'count' => $totalCountCurrent_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&owner=1"),
);

$totalCount['total_owner']['total_owner'] = array(
'count' => $totalCountTotal_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&owner=1"),
);

if (!$isCurrentMonth) {
$totalCount['total_owner']['total_owner'] = array(
'count' => $totalCountTotal_owner,
'url' => false,
// 'url' => CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&membership_status_id=$status&start=&end=$ymd&owner=1"),
);
}
Expand Down

0 comments on commit 3e4e9b7

Please sign in to comment.