r99115 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99114‎ | r99115 | r99116 >
Date:16:17, 6 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
tweak to contestant page
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestant.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -156,6 +156,7 @@
157157 'contest-contestant-header-rating' => 'Rating',
158158 'contest-contestant-header-comments' => 'Amount of comments',
159159 'contest-contestant-submission-url' => 'Submission',
 160+ 'contest-contestant-notsubmitted' => 'Not submitted yet',
160161 );
161162
162163 /** Message documentation (Message documentation)
Index: trunk/extensions/Contest/specials/SpecialContestant.php
@@ -105,11 +105,16 @@
106106 $stats['id'] = htmlspecialchars( $contestant->getField( 'id' ) );
107107 $stats['contest'] = htmlspecialchars( $contestant->getContest()->getField( 'name' ) );
108108
109 - $stats['submission'] = '<b>' . Html::element(
110 - 'a',
111 - array( 'href' => $contestant->getField( 'submission' ) ),
112 - wfMsg( 'contest-contestant-submission-url' )
113 - ) . '</b>';
 109+ if ( $contestant->getField( 'submission' ) === '' ) {
 110+ $stats['submission'] = wfMsg( 'contest-contestant-notsubmitted' );
 111+ }
 112+ else {
 113+ $stats['submission'] = '<b>' . Html::element(
 114+ 'a',
 115+ array( 'href' => $contestant->getField( 'submission' ) ),
 116+ wfMsg( 'contest-contestant-submission-url' )
 117+ ) . '</b>';
 118+ }
114119
115120 $countries = ContestContestant::getCountries();
116121 $stats['country'] = htmlspecialchars( $countries[$contestant->getField( 'country' )] );

Status & tagging log