diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-11-20 16:42:26 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-11-20 16:42:26 +0000 |
| commit | 8f3ea1f144c0f8611b89babd805352c2e035c850 (patch) | |
| tree | 15e5f441d24ce5f9cfae4419477d23709c016079 | |
| parent | 6c7dc4230ce75c8429419ac62d9ba975c4f8baf7 (diff) | |
| download | webtrees-8f3ea1f144c0f8611b89babd805352c2e035c850.tar.gz webtrees-8f3ea1f144c0f8611b89babd805352c2e035c850.tar.bz2 webtrees-8f3ea1f144c0f8611b89babd805352c2e035c850.zip | |
Fix: some charts starting with the wrong person. Use rootid (instead of pid) consistently as the parameter name.
| -rw-r--r-- | fanchart.php | 4 | ||||
| -rw-r--r-- | hourglass.php | 2 | ||||
| -rw-r--r-- | includes/functions/functions_print.php | 4 | ||||
| -rw-r--r-- | library/WT/Controller/Hourglass.php | 16 |
4 files changed, 13 insertions, 13 deletions
diff --git a/fanchart.php b/fanchart.php index 478ef75867..50b593ec83 100644 --- a/fanchart.php +++ b/fanchart.php @@ -299,11 +299,11 @@ function generate_fan_chart($treeid, $fanw=640, $fandeg=270) { if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) { $html.= "<br /><a href=\"relationship.php?pid1=".WT_USER_GEDCOM_ID."&pid2={$pid}&ged=".WT_GEDURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Relationship to me')."</a>"; } - $html.= "<br /><a href=\"descendancy.php?pid=$pid&ged=".WT_GEDURL."\" >".WT_I18N::translate('Descendants')."</a>"; + $html.= "<br /><a href=\"descendancy.php?rootid=$pid&ged=".WT_GEDURL."\" >".WT_I18N::translate('Descendants')."</a>"; $html.= "<br /><a href=\"ancestry.php?rootid=$pid&ged=".WT_GEDURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Ancestors')."</a>"; $html.= "<br /><a href=\"compact.php?rootid=$pid&ged=".WT_GEDURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Compact tree')."</a>"; $html.= "<br /><a href=\"".$tempURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Fan chart')."</a>"; - $html.= "<br /><a href=\"hourglass.php?pid=$pid&ged=".WT_GEDURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Hourglass chart')."</a>"; + $html.= "<br /><a href=\"hourglass.php?rootid=$pid&ged=".WT_GEDURL."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Hourglass chart')."</a>"; if (array_key_exists('tree', WT_Module::getActiveModules())) { $html.= '<br /><a href="module.php?mod=tree&mod_action=treeview&ged='.WT_GEDURL.'&rootid='.$pid."\" onmouseover=\"clear_family_box_timeout('".$pid.".".$count."');\" onmouseout=\"family_box_timeout('".$pid.".".$count."');\">".WT_I18N::translate('Interactive tree')."</a>"; } diff --git a/hourglass.php b/hourglass.php index 195908d914..0f6ead5db6 100644 --- a/hourglass.php +++ b/hourglass.php @@ -56,7 +56,7 @@ $gencount=0; <?php echo WT_I18N::translate('Root Person ID'), help_link('desc_rootid'); ?> </td> <td class="optionbox"> - <input class="pedigree_form" type="text" name="pid" id="pid" size="3" value="<?php echo $controller->pid; ?>" /> + <input class="pedigree_form" type="text" name="rootid" id="rootid" size="3" value="<?php echo $controller->pid; ?>" /> <?php print_findindi_link("pid",""); ?> </td> diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index 71bf6c7553..b4464504b7 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -97,13 +97,13 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) { $personlinks .= '<dt><a href="relationship.php?show_full='.$PEDIGREE_FULL_DETAILS.'&pid1='.WT_USER_GEDCOM_ID.'&pid2='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&pretty=2&followspouse=1&ged='.WT_GEDURL.'"><b>'.WT_I18N::translate('Relationship to me').'</b></a></dt>'; } - $personlinks .= '<dt><a href="descendancy.php?pid='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&generations='.$generations.'&box_width='.$box_width.'&ged='.rawurlencode($GEDCOM).'"><b>'.WT_I18N::translate('Descendants').'</b></a></dt>'; + $personlinks .= '<dt><a href="descendancy.php?rootid='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&generations='.$generations.'&box_width='.$box_width.'&ged='.rawurlencode($GEDCOM).'"><b>'.WT_I18N::translate('Descendants').'</b></a></dt>'; $personlinks .= '<dt><a href="ancestry.php?rootid='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&chart_style='.$chart_style.'&PEDIGREE_GENERATIONS='.$OLD_PGENS.'&box_width='.$box_width.'&ged='.rawurlencode($GEDCOM).'"><b>'.WT_I18N::translate('Ancestors').'</b></a></dt>'; $personlinks .= '<dt><a href="compact.php?rootid='.$pid.'&ged='.rawurlencode($GEDCOM).'"><b>'.WT_I18N::translate('Compact tree').'</b></a></dt>'; if (function_exists("imagettftext")) { $personlinks .= '<dt><a href="fanchart.php?rootid='.$pid.'&PEDIGREE_GENERATIONS='.$OLD_PGENS.'&ged='.rawurlencode($GEDCOM).'"><b>'.WT_I18N::translate('Fan chart').'</b></a></dt>'; } - $personlinks .= '<dt><a href="hourglass.php?pid='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&chart_style='.$chart_style.'&PEDIGREE_GENERATIONS='.$OLD_PGENS.'&box_width='.$box_width.'&ged='.rawurlencode($GEDCOM).'&show_spouse='.$show_spouse.'"><b>'.WT_I18N::translate('Hourglass chart').'</b></a></dt>'; + $personlinks .= '<dt><a href="hourglass.php?rootid='.$pid.'&show_full='.$PEDIGREE_FULL_DETAILS.'&chart_style='.$chart_style.'&PEDIGREE_GENERATIONS='.$OLD_PGENS.'&box_width='.$box_width.'&ged='.rawurlencode($GEDCOM).'&show_spouse='.$show_spouse.'"><b>'.WT_I18N::translate('Hourglass chart').'</b></a></dt>'; if (array_key_exists('tree', WT_Module::getActiveModules())) { $personlinks .= '<dt><a href="module.php?mod=tree&mod_action=treeview&ged='.WT_GEDURL.'&rootid='.$pid.'"><b>'.WT_I18N::translate('Interactive tree').'</b></a></dt>'; } diff --git a/library/WT/Controller/Hourglass.php b/library/WT/Controller/Hourglass.php index 2ba3c5dddb..bfc0e1c242 100644 --- a/library/WT/Controller/Hourglass.php +++ b/library/WT/Controller/Hourglass.php @@ -68,7 +68,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { parent::__construct(); // Extract parameters from from - $this->pid =safe_GET_xref('pid'); + $this->pid =safe_GET_xref('rootid'); $this->show_full =safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS); $this->show_spouse=safe_GET('show_spouse', array('0', '1'), '0'); $this->generations=safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, 3); @@ -357,7 +357,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $spouse = $family->getSpouse($person); if (!empty($spouse)) { $spid = $spouse->getXref(); - echo "<a href=\"hourglass.php?pid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; + echo "<a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; $name = $spouse->getFullName(); if (hasRTLText($name)) echo 'class="name2">'; else echo 'class="name1">'; @@ -369,7 +369,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $children = $family->getChildren(); foreach ($children as $id=>$child) { $cid = $child->getXref(); - echo " <a href=\"hourglass.php?pid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; + echo " <a href=\"hourglass.php?rootid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; $name = $child->getFullName(); if (hasRTLText($name)) echo 'class="name2">'; else echo 'class="name1">'; @@ -387,7 +387,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $husb = $family->getHusband(); if (!empty($husb)) { $spid = $husb->getXref(); - echo " <a href=\"hourglass.php?pid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; + echo " <a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; $name = $husb->getFullName(); $name = rtrim($name); if (hasRTLText($name)) echo 'class="name2">'; @@ -398,7 +398,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $husb = $family->getWife(); if (!empty($husb)) { $spid = $husb->getXref(); - echo " <a href=\"hourglass.php?pid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; + echo " <a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; $name = $husb->getFullName(); $name = rtrim($name); if (hasRTLText($name)) echo 'class="name2">'; @@ -414,7 +414,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { foreach ($children as $id=>$child) { $cid = $child->getXref(); if ($cid!=$pid) { - echo " <a href=\"hourglass.php?pid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; + echo " <a href=\"hourglass.php?rootid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span "; $name = $child->getFullName(); $name = rtrim($name); if (hasRTLText($name)) echo 'class="name2">'; @@ -503,7 +503,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { function ChangeDiv(div_id, ARID, full, spouse, width) { var divelement = document.getElementById(div_id); var oXmlHttp = createXMLHttp(); - oXmlHttp.open("get", "hourglass_ajax.php?show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); + oXmlHttp.open("get", "hourglass_ajax.php?show_full="+full+"&rootid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); oXmlHttp.onreadystatechange=function() { if (oXmlHttp.readyState==4) @@ -520,7 +520,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { function ChangeDis(div_id, ARID, full, spouse, width) { var divelement = document.getElementById(div_id); var oXmlHttp = createXMLHttp(); - oXmlHttp.open("get", "hourglass_ajax.php?type=desc&show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); + oXmlHttp.open("get", "hourglass_ajax.php?type=desc&show_full="+full+"&rootid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); oXmlHttp.onreadystatechange=function() { if (oXmlHttp.readyState==4) |
