From: Alexandre Emsenhuber Date: Sat, 15 Oct 2011 09:43:30 +0000 (+0000) Subject: Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27103 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=75925dcf666063710b688113f9193097c23b50f2;p=lhc%2Fweb%2Fwiklou.git Use local context instead of global variables --- 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() ); } /**