http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100240
Revision: 100240
Author: reedy
Date: 2011-10-19 17:09:28 +0000 (Wed, 19 Oct 2011)
Log Message:
-----------
Parse Wikitext out of challenge text, doesn't feel like the right place to be
doing this, but struggling for anywhere to add some formatting in the
ContestChallenge class
Tweak documentation
Modified Paths:
--------------
trunk/extensions/Contest/specials/SpecialContestWelcome.php
Modified: trunk/extensions/Contest/specials/SpecialContestWelcome.php
===================================================================
--- trunk/extensions/Contest/specials/SpecialContestWelcome.php 2011-10-19
17:09:04 UTC (rev 100239)
+++ trunk/extensions/Contest/specials/SpecialContestWelcome.php 2011-10-19
17:09:28 UTC (rev 100240)
@@ -38,11 +38,10 @@
$out = $this->getOutput();
- $contest = Contest::s()->selectRow( null, array( 'name' =>
$subPage ) );
-
/**
* @var $contest Contest
*/
+ $contest = Contest::s()->selectRow( null, array( 'name' =>
$subPage ) );
if ( $contest === false ) {
$this->showError( 'contest-welcome-unknown' );
@@ -50,7 +49,7 @@
$out->returnToMain();
}
else if ( ( $contest->getStatus() == Contest::STATUS_FINISHED )
||
- ( $contest->getStatus() == Contest::STATUS_EXPIRED )
) {
+ ( $contest->getStatus() == Contest::STATUS_EXPIRED ) ) {
$this->showWarning( 'contest-signup-finished' );
$out->addHTML( '<br /><br /><br /><br />' );
$out->returnToMain();
@@ -132,9 +131,14 @@
protected function addContestJS( Contest $contest ) {
$challenges = array();
+ $output = $this->getOutput();
+ /**
+ * @var $challenge ContestChallenge
+ */
foreach ( $contest->getChallenges() as /* ContestChallenge */
$challenge ) {
$data = $challenge->toArray();
$data['target'] = $this->getSignupLink(
$contest->getField( 'name' ), $challenge->getId() );
+ $data['text'] = $output->parse( $data['text'] );
$challenges[] = $data;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs