summaryrefslogtreecommitdiff
path: root/app/Date.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/Date.php
parent1b00dc40f047cc48fc07766c3e8205941fbd5078 (diff)
downloadwebtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.gz
webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.tar.bz2
webtrees-5d51864bac06ba548eaf7222649e32ec5772d7ce.zip
Replace globals with tree properties
Diffstat (limited to 'app/Date.php')
-rw-r--r--app/Date.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Date.php b/app/Date.php
index 89e30891e2..09495a3f20 100644
--- a/app/Date.php
+++ b/app/Date.php
@@ -209,7 +209,10 @@ class Date {
* @return string
*/
function display($url = false, $date_format = null, $convert_calendars = true) {
- global $TEXT_DIRECTION, $DATE_FORMAT, $CALENDAR_FORMAT;
+ global $TEXT_DIRECTION, $WT_TREE;
+
+ $CALENDAR_FORMAT = $WT_TREE->getPreference('CALENDAR_FORMAT');
+ $DATE_FORMAT = $WT_TREE->getPreference('DATE_FORMAT');
if ($date_format === null) {
$date_format = $DATE_FORMAT;