X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FRevertAction.php;h=8a5d7c9046474e41b44a8c79608cce22bb03b7a2;hb=358348d9bf90f0f1bacb64e5348936e7813108c3;hp=a914c9b2b384dd55d4167a4ef12b8242621de0f2;hpb=975cd8710036865784a97aaffe2c0a3f69c8580c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RevertAction.php b/includes/actions/RevertAction.php index a914c9b2b3..8a5d7c9046 100644 --- a/includes/actions/RevertAction.php +++ b/includes/actions/RevertAction.php @@ -23,6 +23,8 @@ * @author Rob Church */ +use MediaWiki\MediaWikiServices; + /** * File reversion user interface * @@ -78,8 +80,6 @@ class RevertAction extends FormAction { } protected function getFormFields() { - global $wgContLang; - $timestamp = $this->oldFile->getTimestamp(); $user = $this->getUser(); @@ -88,8 +88,9 @@ class RevertAction extends FormAction { $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 [ @@ -135,7 +136,10 @@ class RevertAction extends FormAction { 0, false, false, - $this->getUser() + $this->getUser(), + [], + true, + true ); }