X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=sql%2FGenerateData.php;h=057d8af5a13643d39e93d3f1472d5089f484d098;hb=4392acee900207a4643d34c0df995bf0ef931fc6;hp=8996e05e17dc06f62f16f191ebb5c943e2feebea;hpb=9e54b030990a50d545f4389c1cfe4a47efb5690a;p=civicrm-core.git diff --git a/sql/GenerateData.php b/sql/GenerateData.php index 8996e05e17..057d8af5a1 100644 --- a/sql/GenerateData.php +++ b/sql/GenerateData.php @@ -1,34 +1,18 @@ 40) { + if ($contact->gender_id && $contact->gender_id == 2) { + $checkAge = 64; + } + else { + $checkAge = 68; + } + if ($age > $checkAge && count($this->deceasedContactIds) < 4) { $contact->is_deceased = $this->probability(($age - 30) / 100); if ($contact->is_deceased && $this->probability(.7)) { $contact->deceased_date = $this->randomDate(); @@ -702,6 +693,9 @@ class CRM_GCD { $contact->hash = crc32($contact->sort_name); $contact->id = $cid; $this->_update($contact); + if ($contact->is_deceased) { + $this->deceasedContactIds[] = $cid; + } } }