r107978 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107977‎ | r107978 | r107979 >
Date:01:03, 4 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Fix undefined call to context()->getLang()

Added getLanguage functions to RequestContext also (for ease, hah!)
Modified paths:
  • /branches/wmf/1.18wmf1/includes/RequestContext.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/RequestContext.php
@@ -65,6 +65,13 @@
6666 public function getLang();
6767
6868 /**
 69+ * Get the Language object
 70+ *
 71+ * @return Language
 72+ */
 73+ public function getLanguage();
 74+
 75+ /**
6976 * Get the Skin object
7077 *
7178 * @return Skin
@@ -234,6 +241,15 @@
235242 }
236243
237244 /**
 245+ * Get the Language object
 246+ *
 247+ * @return Language
 248+ */
 249+ public function getLanguage() {
 250+ return $this->getLang();
 251+ }
 252+
 253+ /**
238254 * Set the Skin object
239255 *
240256 * @param $s Skin
@@ -379,6 +395,15 @@
380396 }
381397
382398 /**
 399+ * Get the Language object
 400+ *
 401+ * @return Language
 402+ */
 403+ public function getLanguage() {
 404+ return $this->getContext()->getLang();
 405+ }
 406+
 407+ /**
383408 * Get the Skin object
384409 *
385410 * @return Skin
Index: branches/wmf/1.18wmf1/includes/SpecialPage.php
@@ -683,7 +683,7 @@
684684 * @return Language
685685 */
686686 public function getLanguage() {
687 - return $this->getContext()->getLanguage();
 687+ return $this->getContext()->getLang();
688688 }
689689
690690 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r107979"Merge" r107978reedy01:07, 4 January 2012

Status & tagging log