summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-12-21 13:18:52 +0000
committerGreg Roach <fisharebest@gmail.com>2013-12-21 13:18:52 +0000
commitcdcddb2a9dbe0e5f88531ad770e293fa74550d72 (patch)
tree51a6ae33deb0e606648a01bbc5106c4ae1ad644d
parent30f5c8c6f98bd348483bbccc224591187e02c2aa (diff)
downloadwebtrees-cdcddb2a9dbe0e5f88531ad770e293fa74550d72.tar.gz
webtrees-cdcddb2a9dbe0e5f88531ad770e293fa74550d72.tar.bz2
webtrees-cdcddb2a9dbe0e5f88531ad770e293fa74550d72.zip
#1261535 - ERROR 8: Undefined variable: child - 1.5.2 dev
-rw-r--r--includes/functions/functions_charts.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php
index 9b39de1df5..fc847b8f69 100644
--- a/includes/functions/functions_charts.php
+++ b/includes/functions/functions_charts.php
@@ -246,8 +246,8 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='',
function print_family_children(WT_Family $family, $childid = "", $sosa = 0, $label="", $personcount="1") {
global $bwidth, $bheight, $pbwidth, $pbheight, $cbheight, $cbwidth, $show_cousins, $WT_IMAGES, $TEXT_DIRECTION;
- $children = $family->getFacts('CHIL');
- $numchil=$family->getNumberOfChildren();
+ $children = $family->getChildren();
+ $numchil = count($children);
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\"><tr>";
if ($sosa>0) echo "<td></td>";
@@ -274,8 +274,7 @@ function print_family_children(WT_Family $family, $childid = "", $sosa = 0, $lab
$nchi=1;
if ($children) {
- foreach ($children as $chil) {
- $child = $chil->getTarget();
+ foreach ($children as $child) {
echo '<tr>';
if ($sosa != 0) {
if ($child->getXref() == $childid) {
@@ -286,9 +285,9 @@ function print_family_children(WT_Family $family, $childid = "", $sosa = 0, $lab
print_sosa_number($label.($nchi++).".");
}
}
- if ($chil->isNew()) {
+ if ($child->isNew()) {
echo '<td valign="middle" class="new">';
- } elseif ($chil->isOld()) {
+ } elseif ($child->isOld()) {
echo '<td valign="middle" class="old">';
} else {
echo '<td valign="middle">';