r89875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89874‎ | r89875 | r89876 >
Date:08:40, 11 June 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
And I forgot to commit this file in r89874
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -639,6 +639,16 @@
640640 }
641641
642642 /**
 643+ * Shortcut to get user's language
 644+ *
 645+ * @return Language
 646+ * @since 1.19
 647+ */
 648+ public function getLang() {
 649+ return $this->getContext()->getLang();
 650+ }
 651+
 652+ /**
643653 * Return the full title, including $par
644654 *
645655 * @return Title

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89874* Made Special:RevisionDelete use the local variables stored in the RequestCo...ialex08:30, 11 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:21, 11 June 2011

Since we have getOutput and not getOut, would it make sense to rename this to getLanguage()?

#Comment by IAlex (talk | contribs)   09:28, 11 June 2011

I took that name to be consistent with RequestContext, otherwise it would be hard to know in which class this is named getLang() and in which class it's name getLanguage().

#Comment by Nikerabbit (talk | contribs)   10:03, 11 June 2011

I think I asked the same question when that was added...

Status & tagging log