Skip to content

Commit

Permalink
Pedigree map, max generations
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Apr 7, 2016
1 parent 04c8df5 commit fdd299b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/Module/GoogleMapsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,18 +745,15 @@ private function pedigreeMap() {
global $controller, $WT_TREE;

$MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
// Limit this to match available number of icons.
// 8 generations equals 255 individuals
$MAX_PEDIGREE_GENERATIONS = min($MAX_PEDIGREE_GENERATIONS, 8);

$controller = new ChartController();
$this->generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
$this->generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
$this->treesize = pow(2, $this->generations) - 1;
$this->ancestors = array_values($controller->sosaAncestors($this->generations));

// Start of internal configuration variables
// Limit this to match available number of icons.
// 8 generations equals 255 individuals
$MAX_PEDIGREE_GENERATIONS = min($MAX_PEDIGREE_GENERATIONS, 8);

// End of internal configuration variables
$controller
->setPageTitle(/* I18N: %s is an individual’s name */ I18N::translate('Pedigree map of %s', $controller->root->getFullName()))
->pageHeader()
Expand Down

0 comments on commit fdd299b

Please sign in to comment.