r106838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106837‎ | r106838 | r106839 >
Date:19:15, 20 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/Contest (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContest.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContestPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialEditContest.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContestPage.php
@@ -180,5 +180,17 @@
181181
182182 $this->getOutput()->addHTML( self::getNavigation( $subPage, $this->getUser(), $this->getLang(), $this->getName() ) );
183183 }
 184+
 185+ /**
 186+ * Get the Language being used for this instance.
 187+ * getLang was deprecated in 1.19, getLanguage was introduces in the same version.
 188+ *
 189+ * @since 0.2
 190+ *
 191+ * @return Language
 192+ */
 193+ public function getLanguage() {
 194+ return method_exists( get_parent_class(), 'getLanguage' ) ? parent::getLanguage() : $this->getLang();
 195+ }
184196
185197 }
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContest.php
@@ -304,7 +304,7 @@
305305 $this->getOutput()->addHTML(
306306 '<fieldset>' .
307307 '<legend>' . wfMsgHtml( 'contest-contest-showonly' ) . '</legend>' .
308 - '<form method="post" action="' . $GLOBALS['wgScript'] . '?title=' . $title . '">' .
 308+ '<form method="post" action="' . htmlspecialchars( wfAppendQuery( $GLOBALS['wgScript'], array( 'title' => $title ) ) ) . '">' .
309309 Html::hidden( 'title', $title ) .
310310 $this->getDropdownHTML(
311311 'challenge',
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialEditContest.php
@@ -395,6 +395,18 @@
396396 '<p class="visualClear warningbox">' . wfMsgExt( $message, 'parseinline' ) . '</p>'
397397 );
398398 }
 399+
 400+ /**
 401+ * Get the Language being used for this instance.
 402+ * getLang was deprecated in 1.19, getLanguage was introduces in the same version.
 403+ *
 404+ * @since 0.2
 405+ *
 406+ * @return Language
 407+ */
 408+ public function getLanguage() {
 409+ return method_exists( get_parent_class(), 'getLanguage' ) ? parent::getLanguage() : $this->getLang();
 410+ }
399411
400412 }
401413
Property changes on: branches/wmf/1.18wmf1/extensions/Contest
___________________________________________________________________
Modified: svn:mergeinfo
402414 Merged /trunk/extensions/Contest:r106452,106603,106708-106709,106713-106714

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106452Follow up to r101940; fix escape failjeroendedauw18:09, 16 December 2011
r106603restore compat w/ mw 1.18jeroendedauw21:43, 18 December 2011
r106708fix inf recursion failjeroendedauw22:20, 19 December 2011
r106709fix inf recursion failjeroendedauw22:22, 19 December 2011
r106713Follow up to r106452; proper escapejeroendedauw22:31, 19 December 2011
r106714Follow up to r106713; this code does not like me :(jeroendedauw22:38, 19 December 2011

Status & tagging log