summaryrefslogtreecommitdiff
path: root/app/Controller/PedigreeController.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-02-05 17:40:29 +0000
committerGreg Roach <fisharebest@gmail.com>2015-02-05 17:40:29 +0000
commit5d51864bac06ba548eaf7222649e32ec5772d7ce (patch)
tree41344cc0645e6e8b91967b0f7f13297bc8fdf284 /app/Controller/PedigreeController.php
parent1b00dc40f047cc48fc07766c3e8205941fbd5078 (diff)
downloadwebtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.gz
webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.bz2
webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.zip
Replace globals with tree properties
Diffstat (limited to 'app/Controller/PedigreeController.php')
-rw-r--r--app/Controller/PedigreeController.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/Controller/PedigreeController.php b/app/Controller/PedigreeController.php
index 0189c345bc..87bc4fc74f 100644
--- a/app/Controller/PedigreeController.php
+++ b/app/Controller/PedigreeController.php
@@ -41,11 +41,8 @@ class PedigreeController extends ChartController {
* Create a pedigree controller
*/
public function __construct() {
- global $PEDIGREE_FULL_DETAILS, $PEDIGREE_LAYOUT, $MAX_PEDIGREE_GENERATIONS;
- global $DEFAULT_PEDIGREE_GENERATIONS;
- global $bwidth, $bheight, $baseyoffset, $basexoffset, $byspacing, $bxspacing;
-
- global $show_full, $talloffset;
+ global $WT_TREE;
+ global $bwidth, $bheight, $baseyoffset, $basexoffset, $byspacing, $bxspacing, $show_full, $talloffset;
parent::__construct();
$this->linewidth = Theme::theme()->parameter('line-width');
@@ -54,10 +51,10 @@ class PedigreeController extends ChartController {
$this->shadowoffsetX = Theme::theme()->parameter('shadow-offset-x');
$this->shadowoffsetY = Theme::theme()->parameter('shadow-offset-y');
- $this->show_full = Filter::getInteger('show_full', 0, 1, $PEDIGREE_FULL_DETAILS);
- $this->talloffset = Filter::getInteger('talloffset', 0, 3, $PEDIGREE_LAYOUT);
+ $this->show_full = Filter::getInteger('show_full', 0, 1, $WT_TREE->getPreference('PEDIGREE_FULL_DETAILS'));
+ $this->talloffset = Filter::getInteger('talloffset', 0, 3, $WT_TREE->getPreference('PEDIGREE_LAYOUT'));
$this->box_width = Filter::getInteger('box_width', 50, 300, 100);
- $this->PEDIGREE_GENERATIONS = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS);
+ $this->PEDIGREE_GENERATIONS = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
// With more than 8 generations, we run out of pixels on the <canvas>
if ($this->PEDIGREE_GENERATIONS > 8) {