Skip to content

Commit

Permalink
Refactor relationship calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
HuubMons committed Jan 23, 2025
1 parent 7cf5246 commit 111a2e9
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 3,016 deletions.
7 changes: 3 additions & 4 deletions app/controller/relationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function getRelations($db_functions, $person_cls, $link_cls, $uri_path, $
$RelationsModel->getNames();
$RelationsModel->getGEDCOMnumbers();
$RelationsModel->switchPersons();

$RelationsModel->set_control_variables();

// *** Extended search ***
Expand All @@ -30,16 +29,16 @@ public function getRelations($db_functions, $person_cls, $link_cls, $uri_path, $
$RelationsModel->process_extended_calculation();
}

// TODO if refactor is finished, this could probably be improved.
// TODO this could probably be improved.
// Second array needed for marriage relationship. Some variables were used for processing marriage relationship.
// $standard_extend is first array needed for standard and extended calculation.
$standard_extended = $RelationsModel->get_variables_standard_extended();

// *** Process marriage relationship. This function will use same variables ***
$RelationsModel->process_marriage_relationship();

$variables = $RelationsModel->get_variables();
$relation = array_merge($standard_extended, $variables);
$relation = $RelationsModel->get_variables();
$relation = array_merge($standard_extended, $relation);

// http://localhost/HuMo-genealogy/family/3/F116?main_person=I202
$relation['fam_path'] = $link_cls->get_link($uri_path, 'family', $tree_id, true);
Expand Down
Loading

0 comments on commit 111a2e9

Please sign in to comment.