diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-03-07 11:33:29 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-03-08 16:23:35 +0000 |
| commit | 4b9ff166b3342695f2a94855b7a33368e6d55c35 (patch) | |
| tree | 0a1c31662df08206dbd7d04fe6983f438f4e6877 /app/Controller/FanchartController.php | |
| parent | 1784a549f5382ce854e7a2b015c1367735d8b2e0 (diff) | |
| download | webtrees-4b9ff166b3342695f2a94855b7a33368e6d55c35.tar.gz webtrees-4b9ff166b3342695f2a94855b7a33368e6d55c35.tar.bz2 webtrees-4b9ff166b3342695f2a94855b7a33368e6d55c35.zip | |
Remove constants, to improve multi-tree handling
Diffstat (limited to 'app/Controller/FanchartController.php')
| -rw-r--r-- | app/Controller/FanchartController.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/app/Controller/FanchartController.php b/app/Controller/FanchartController.php index 4ef7da9f34..62bca2d628 100644 --- a/app/Controller/FanchartController.php +++ b/app/Controller/FanchartController.php @@ -335,7 +335,7 @@ class FanchartController extends ChartController { // add action url $pid = $person->getXref(); $imagemap .= '" href="#' . $pid . '"'; - $tempURL = 'fanchart.php?rootid=' . $pid . '&generations=' . $this->generations . '&fan_width=' . $this->fan_width . '&fan_style=' . $this->fan_style . '&ged=' . WT_GEDURL; + $tempURL = 'fanchart.php?rootid=' . $pid . '&generations=' . $this->generations . '&fan_width=' . $this->fan_width . '&fan_style=' . $this->fan_style . '&ged=' . $person->getTree()->getNameUrl(); $html .= '<div id="' . $pid . '" class="fan_chart_menu">'; $html .= '<div class="person_box"><div class="details1">'; $html .= '<a href="' . $person->getHtmlUrl() . '" class="name1">' . $name; @@ -344,20 +344,21 @@ class FanchartController extends ChartController { } $html .= '</a>'; $html .= '<ul class="charts">'; - $html .= '<li><a href="pedigree.php?rootid=' . $pid . '&ged=' . WT_GEDURL . '" >' . I18N::translate('Pedigree') . '</a></li>'; + $html .= '<li><a href="pedigree.php?rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '" >' . I18N::translate('Pedigree') . '</a></li>'; if (Module::getModuleByName('googlemap')) { - $html .= '<li><a href="module.php?mod=googlemap&mod_action=pedigree_map&rootid=' . $pid . '&ged=' . WT_GEDURL . '">' . I18N::translate('Pedigree map') . '</a></li>'; + $html .= '<li><a href="module.php?mod=googlemap&mod_action=pedigree_map&rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '">' . I18N::translate('Pedigree map') . '</a></li>'; } - if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID != $pid) { - $html .= '<li><a href="relationship.php?pid1=' . WT_USER_GEDCOM_ID . '&pid2=' . $pid . '&ged=' . WT_GEDURL . '">' . I18N::translate('Relationship to me') . '</a></li>'; + $gedcomid = $person->getTree()->getUserPreference(Auth::user(), 'gedcomid'); + if ($gedcomid && $gedcomid != $pid) { + $html .= '<li><a href="relationship.php?pid1=' . $gedcomid . '&pid2=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '">' . I18N::translate('Relationship to me') . '</a></li>'; } - $html .= '<li><a href="descendancy.php?rootid=' . $pid . '&ged=' . WT_GEDURL . '" >' . I18N::translate('Descendants') . '</a></li>'; - $html .= '<li><a href="ancestry.php?rootid=' . $pid . '&ged=' . WT_GEDURL . '">' . I18N::translate('Ancestors') . '</a></li>'; - $html .= '<li><a href="compact.php?rootid=' . $pid . '&ged=' . WT_GEDURL . '">' . I18N::translate('Compact tree') . '</a></li>'; + $html .= '<li><a href="descendancy.php?rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '" >' . I18N::translate('Descendants') . '</a></li>'; + $html .= '<li><a href="ancestry.php?rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '">' . I18N::translate('Ancestors') . '</a></li>'; + $html .= '<li><a href="compact.php?rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '">' . I18N::translate('Compact tree') . '</a></li>'; $html .= '<li><a href="' . $tempURL . '">' . I18N::translate('Fan chart') . '</a></li>'; - $html .= '<li><a href="hourglass.php?rootid=' . $pid . '&ged=' . WT_GEDURL . '">' . I18N::translate('Hourglass chart') . '</a></li>'; + $html .= '<li><a href="hourglass.php?rootid=' . $pid . '&ged=' . $person->getTree()->getNameUrl() . '">' . I18N::translate('Hourglass chart') . '</a></li>'; if (Module::getModuleByName('tree')) { - $html .= '<li><a href="module.php?mod=tree&mod_action=treeview&ged=' . WT_GEDURL . '&rootid=' . $pid . '">' . I18N::translate('Interactive tree') . '</a></li>'; + $html .= '<li><a href="module.php?mod=tree&mod_action=treeview&ged=' . $person->getTree()->getNameUrl() . '&rootid=' . $pid . '">' . I18N::translate('Interactive tree') . '</a></li>'; } $html .= '</ul>'; // spouse(s) and children |
