Skip to content

Commit

Permalink
Fix http 500 error on Relationship report caused by duplicate code ad…
Browse files Browse the repository at this point in the history
…ded in security update
  • Loading branch information
seamuslee001 committed Feb 10, 2016
1 parent df078f6 commit 0100bef
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 0100bef

Please sign in to comment.