summaryrefslogtreecommitdiff
path: root/app/Place.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/Place.php
parent1b00dc40f047cc48fc07766c3e8205941fbd5078 (diff)
downloadwebtrees-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.php6
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 {