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/Date.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/Date.php') 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; -- cgit v1.3