diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-02-05 17:40:29 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-02-05 17:40:29 +0000 |
| commit | 5d51864bac06ba548eaf7222649e32ec5772d7ce (patch) | |
| tree | 41344cc0645e6e8b91967b0f7f13297bc8fdf284 /app/Place.php | |
| parent | 1b00dc40f047cc48fc07766c3e8205941fbd5078 (diff) | |
| download | webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.gz webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.bz2 webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.zip | |
Replace globals with tree properties
Diffstat (limited to 'app/Place.php')
| -rw-r--r-- | app/Place.php | 6 |
1 files changed, 4 insertions, 2 deletions
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 { |
