From 5d51864bac06ba548eaf7222649e32ec5772d7ce Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Thu, 5 Feb 2015 17:40:29 +0000 Subject: Replace globals with tree properties --- app/Place.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/Place.php') diff --git a/app/Place.php b/app/Place.php index a3c936f6f4..deb93e35a5 100644 --- a/app/Place.php +++ b/app/Place.php @@ -151,14 +151,16 @@ class Place { * @return string */ public function getShortName() { - global $SHOW_PEDIGREE_PLACES, $SHOW_PEDIGREE_PLACES_SUFFIX; + global $WT_TREE; + + $SHOW_PEDIGREE_PLACES = $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES'); if ($SHOW_PEDIGREE_PLACES >= count($this->gedcom_place)) { // A short place name - no need to abbreviate return $this->getFullName(); } else { // Abbreviate the place name, for lists - if ($SHOW_PEDIGREE_PLACES_SUFFIX) { + if ($WT_TREE->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX')) { // The *last* $SHOW_PEDIGREE_PLACES components $short_name = implode(self::GEDCOM_SEPARATOR, array_slice($this->gedcom_place, -$SHOW_PEDIGREE_PLACES)); } else { -- cgit v1.3