* @author Rob Church <robchur@gmail.com>
*/
+use MediaWiki\MediaWikiServices;
+
/**
* File reversion user interface
*
}
protected function getFormFields() {
- global $wgContLang;
-
$timestamp = $this->oldFile->getTimestamp();
$user = $this->getUser();
$userTime = $lang->userTime( $timestamp, $user );
$siteTs = MWTimestamp::getLocalInstance( $timestamp );
$ts = $siteTs->format( 'YmdHis' );
- $siteDate = $wgContLang->date( $ts, false, false );
- $siteTime = $wgContLang->time( $ts, false, false );
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $siteDate = $contLang->date( $ts, false, false );
+ $siteTime = $contLang->time( $ts, false, false );
$tzMsg = $siteTs->getTimezoneMessage()->inContentLanguage()->text();
return [