r98273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98272‎ | r98273 | r98274 >
Date:22:06, 27 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added landing special page
Modified paths:
  • /trunk/extensions/Contest/Contest.alias.php (modified) (history)
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSignup.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestWelcome.php (added) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -18,7 +18,7 @@
1919 * @author Jeroen De Dauw
2020 */
2121 $messages['en'] = array(
22 - 'contest-desc' => '',
 22+ 'contest-desc' => 'Contest extension that allows users to participate in admin defined contest challanges. Via a judging interface, judges can discuss and vote on submissions.',
2323
2424 // Rights
2525 'right-contestadmin' => 'Manage contests',
@@ -35,6 +35,7 @@
3636 'special-contests' => 'Contests',
3737 'special-contestsignup' => 'Contest signup',
3838 'special-contestsubmission' => 'Contest submission',
 39+ 'special-contestwelcome' => 'Contest',
3940 'special-editcontest' => 'Edit contest',
4041
4142 // Special:Contests
Index: trunk/extensions/Contest/Contest.alias.php
@@ -20,5 +20,6 @@
2121 'Contests' => array( 'Contests' ),
2222 'ContestSignup' => array( 'ContestSignup' ),
2323 'ContestSubmission' => array( 'ContestSubmission' ),
 24+ 'ContestWelcome' => array( 'ContestWelcome' ),
2425 'EditContest' => array( 'EditContest' ),
2526 );
Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php
@@ -0,0 +1,49 @@
 2+<?php
 3+
 4+/**
 5+ * Contest landing page for participants.
 6+ *
 7+ * @since 0.1
 8+ *
 9+ * @file SpecialContestWelcome.php
 10+ * @ingroup Contest
 11+ *
 12+ * @licence GNU GPL v3 or later
 13+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 14+ */
 15+class SpecialContestWelcome extends SpecialContestPage {
 16+
 17+ /**
 18+ * Constructor.
 19+ *
 20+ * @since 0.1
 21+ */
 22+ public function __construct() {
 23+ parent::__construct( 'ContestWelcome' );
 24+ }
 25+
 26+ /**
 27+ * @see SpecialPage::getDescription
 28+ *
 29+ * @since 0.1
 30+ */
 31+ public function getDescription() {
 32+ return wfMsg( 'special-' . strtolower( $this->getName() ) );
 33+ }
 34+
 35+ /**
 36+ * Main method.
 37+ *
 38+ * @since 0.1
 39+ *
 40+ * @param string $arg
 41+ */
 42+ public function execute( $subPage ) {
 43+ if ( !parent::execute( $subPage ) ) {
 44+ return;
 45+ }
 46+
 47+
 48+ }
 49+
 50+}
\ No newline at end of file
Property changes on: trunk/extensions/Contest/specials/SpecialContestWelcome.php
___________________________________________________________________
Added: svn:eol-style
151 + native
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php
@@ -1,7 +1,7 @@
22 <?php
33
44 /**
5 - * Contest signupu interface for participants.
 5+ * Contest signup interface for participants.
66 *
77 * @since 0.1
88 *
Index: trunk/extensions/Contest/Contest.php
@@ -59,6 +59,7 @@
6060 $wgAutoloadClasses['SpecialContests'] = dirname( __FILE__ ) . '/specials/SpecialContests.php';
6161 $wgAutoloadClasses['SpecialContestSignup'] = dirname( __FILE__ ) . '/specials/SpecialContestSignup.php';
6262 $wgAutoloadClasses['SpecialContestSubmission'] = dirname( __FILE__ ) . '/specials/SpecialContestSubmission.php';
 63+$wgAutoloadClasses['SpecialContestWelcome'] = dirname( __FILE__ ) . '/specials/SpecialContestWelcome.php';
6364 $wgAutoloadClasses['SpecialEditContest'] = dirname( __FILE__ ) . '/specials/SpecialEditContest.php';
6465
6566 // Special pages
@@ -66,12 +67,14 @@
6768 $wgSpecialPages['Contests'] = 'SpecialContests';
6869 $wgSpecialPages['ContestSignup'] = 'SpecialContestSignup';
6970 $wgSpecialPages['ContestSubmission'] = 'SpecialContestSubmission';
 71+$wgSpecialPages['ContestWelcome'] = 'SpecialContestWelcome';
7072 $wgSpecialPages['EditContest'] = 'SpecialEditContest';
7173
7274 $wgSpecialPageGroups['Contest'] = 'other';
7375 $wgSpecialPageGroups['Contests'] = 'other';
7476 $wgSpecialPageGroups['ContestSignup'] = 'other';
7577 $wgSpecialPageGroups['ContestSubmission'] = 'other';
 78+$wgSpecialPageGroups['ContestWelcome'] = 'other';
7679 $wgSpecialPageGroups['EditContest'] = 'other';
7780
7881 // API

Status & tagging log