summaryrefslogtreecommitdiff
path: root/includes/functions/functions_print_lists.php
diff options
context:
space:
mode:
authorŁukasz Wilenski <wooc@gazeta.pl>2010-08-01 17:29:47 +0000
committerŁukasz Wilenski <wooc@gazeta.pl>2010-08-01 17:29:47 +0000
commitadaee592d90d58190bdbc548a4c71bb4d0c60a2a (patch)
tree3d3a16afd868fc723255488a2dcaf36d7b7ca9cd /includes/functions/functions_print_lists.php
parent2ae1c9a2f777e94a8d1936e29440b412d1ef8157 (diff)
downloadwebtrees-adaee592d90d58190bdbc548a4c71bb4d0c60a2a.tar.gz
webtrees-adaee592d90d58190bdbc548a4c71bb4d0c60a2a.tar.bz2
webtrees-adaee592d90d58190bdbc548a4c71bb4d0c60a2a.zip
don't count the same indi twice
Diffstat (limited to 'includes/functions/functions_print_lists.php')
-rw-r--r--includes/functions/functions_print_lists.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index 347f214f0d..e5e2aa4f3d 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -152,7 +152,6 @@ function print_indi_table($datalist, $legend="", $option="") {
$hidden++;
continue;
}
- $unique_indis[$person->getXref()]=true;
//-- place filtering
if ($option=="BIRT_PLAC" && strstr($person->getBirthPlace(), $filter)===false) continue;
if ($option=="DEAT_PLAC" && strstr($person->getDeathPlace(), $filter)===false) continue;
@@ -225,7 +224,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo '<div>', str_replace('<a', '<a name="'.$birth_date->MinJD().'"', $birth_date->Display(!$SEARCH_SPIDER)), '</div>';
}
}
- if ($birth_dates[0]->gregorianYear()>=1550 && $birth_dates[0]->gregorianYear()<2030) {
+ if ($birth_dates[0]->gregorianYear()>=1550 && $birth_dates[0]->gregorianYear()<2030 && !isset($unique_indis[$person->getXref()])) {
$birt_by_decade[floor($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex();
}
} else {
@@ -283,7 +282,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo '<div>', str_replace('<a', '<a name="'.$death_date->MinJD().'"', $death_date->Display(!$SEARCH_SPIDER)), '</div>';
}
}
- if ($death_dates[0]->gregorianYear()>=1550 && $death_dates[0]->gregorianYear()<2030) {
+ if ($death_dates[0]->gregorianYear()>=1550 && $death_dates[0]->gregorianYear()<2030 && !isset($unique_indis[$person->getXref()])) {
$deat_by_decade[floor($death_dates[0]->gregorianYear()/10)*10] .= $person->getSex();
}
} else {
@@ -314,7 +313,9 @@ function print_indi_table($datalist, $legend="", $option="") {
$age = GedcomDate::GetAgeYears($birth_dates[0], $death_dates[0]);
$age_jd = $death_dates[0]->MinJD()-$birth_dates[0]->MinJD();
echo '<a name="', $age_jd, '" class="list_item age">', $age, '</a>';
- $deat_by_age[max(0, min($max_age, $age))] .= $person->getSex();
+ if (!isset($unique_indis[$person->getXref()])) {
+ $deat_by_age[max(0, min($max_age, $age))] .= $person->getSex();
+ }
} else {
echo '<a name="-1">&nbsp;</a>';
}
@@ -373,6 +374,7 @@ function print_indi_table($datalist, $legend="", $option="") {
}
echo "</td>";
echo "</tr>\n";
+ $unique_indis[$person->getXref()]=true;
}
echo "</tbody>";
//-- table footer