r104015 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104014‎ | r104015 | r104016 >
Date:10:28, 23 November 2011
Author:johnduhart
Status:ok
Tags:
Comment:
Followup r103817, updating setLang usages
Modified paths:
  • /trunk/phase3/includes/context/DerivativeContext.php (modified) (history)
  • /trunk/phase3/includes/context/RequestContext.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -3250,7 +3250,7 @@
32513251 $context->setTitle( $title );
32523252 $context->setRequest( new FauxRequest( $pageArgs ) );
32533253 $context->setUser( $this->getUser() );
3254 - $context->setLang( $this->mOptions->getUserLangObj() );
 3254+ $context->setLanguage( $this->mOptions->getUserLangObj() );
32553255 $ret = SpecialPageFactory::capturePath( $title, $context );
32563256 if ( $ret ) {
32573257 $text = $context->getOutput()->getHTML();
Index: trunk/phase3/includes/context/RequestContext.php
@@ -165,9 +165,19 @@
166166 /**
167167 * Set the Language object
168168 *
 169+ * @deprecated 1.19 Use setLanguage instead
169170 * @param $l Mixed Language instance or language code
170171 */
171172 public function setLang( $l ) {
 173+ $this->setLanguage( $l );
 174+ }
 175+
 176+ /**
 177+ * Set the Language object
 178+ *
 179+ * @param $l Mixed Language instance or language code
 180+ */
 181+ public function setLanguage( $l ) {
172182 if ( $l instanceof Language ) {
173183 $this->lang = $l;
174184 } elseif ( is_string( $l ) ) {
Index: trunk/phase3/includes/context/DerivativeContext.php
@@ -158,9 +158,19 @@
159159 /**
160160 * Set the Language object
161161 *
 162+ * @deprecated 1.19 Use setLanguage instead
162163 * @param $l Mixed Language instance or language code
163164 */
164165 public function setLang( $l ) {
 166+ $this->setLanguage( $l );
 167+ }
 168+
 169+ /**
 170+ * Set the Language object
 171+ *
 172+ * @param $l Mixed Language instance or language code
 173+ */
 174+ public function setLanguage( $l ) {
165175 if ( $l instanceof Language ) {
166176 $this->lang = $l;
167177 } elseif ( is_string( $l ) ) {
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -744,7 +744,7 @@
745745 $code = $request->getVal( 'uselang', $user->getOption( 'language' ) );
746746 $userLang = Language::factory( $code );
747747 $wgLang = $userLang;
748 - $this->getContext()->setLang( $userLang );
 748+ $this->getContext()->setLanguage( $userLang );
749749 return $this->successfulLogin();
750750 } else {
751751 return $this->cookieRedirectCheck( 'login' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103817Bug 29524 - Rename RequestContext::getLang to getLanguage...johnduhart16:13, 21 November 2011

Status & tagging log