From 75925dcf666063710b688113f9193097c23b50f2 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 15 Oct 2011 09:43:30 +0000 Subject: [PATCH] Use local context instead of global variables --- includes/RevisionList.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/RevisionList.php b/includes/RevisionList.php index cf0c32a132..8b17578751 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -184,19 +184,19 @@ abstract class RevisionItemBase { } /** - * Get the date, formatted with $wgLang + * Get the date, formatted in user's languae */ public function formatDate() { - global $wgLang; - return $wgLang->date( $this->getTimestamp() ); + return $this->list->context->getLang()->userDate( $this->getTimestamp(), + $this->list->context->getUser() ); } /** - * Get the time, formatted with $wgLang + * Get the time, formatted in user's languae */ public function formatTime() { - global $wgLang; - return $wgLang->time( $this->getTimestamp() ); + return $this->list->context->getLang()->userTime( $this->getTimestamp(), + $this->list->context->getUser() ); } /** -- 2.20.1