Skip to content

Commit

Permalink
Merge pull request civicrm#20 from seamuslee001/fuzion_fix
Browse files Browse the repository at this point in the history
Fix http 500 error on Relationship report caused by duplicate code ad…
  • Loading branch information
eileenmcnaughton committed Feb 10, 2016
2 parents df078f6 + 0100bef commit 987d415
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions CRM/Report/Form/Contact/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,22 +679,4 @@ public function buildValidityQuery($valid) {
return $clause;
}

/**
* @param $valid bool - set to 1 if we are looking for a valid relationship, 0 if not
*
* @return array
*/
public function buildValidityQuery($valid) {
$clause = NULL;
if ($valid == '1') {
// relationships dates are not expired
$clause = "((start_date <= CURDATE() OR start_date is null) AND (end_date >= CURDATE() OR end_date is null))";
}
elseif ($valid == '0') {
// relationships dates are expired or has not started yet
$clause = "(start_date >= CURDATE() OR end_date < CURDATE())";
}
return $clause;
}

}

0 comments on commit 987d415

Please sign in to comment.