r99587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99586‎ | r99587 | r99588 >
Date:22:16, 11 October 2011
Author:catrope
Status:ok
Tags:
Comment:
Put all special pages in the Contests group, and fix some typos and whitespace
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/includes/Contest.class.php (modified) (history)
  • /trunk/extensions/Contest/includes/ContestDBObject.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -57,6 +57,7 @@
5858 'special-contestwelcome' => 'View a contest',
5959 'special-editcontest' => 'Edit a contest',
6060 'special-mycontests' => 'My contests',
 61+ 'specialpages-group-contest' => 'Contests',
6162
6263 // Navigation links
6364 'contest-nav-contests' => 'Contests list',
Index: trunk/extensions/Contest/Contest.php
@@ -83,13 +83,13 @@
8484 $wgSpecialPages['EditContest'] = 'SpecialEditContest';
8585 $wgSpecialPages['MyContests'] = 'SpecialMyContests';
8686
87 -$wgSpecialPageGroups['Contest'] = 'other';
88 -$wgSpecialPageGroups['Contestant'] = 'other';
89 -$wgSpecialPageGroups['Contests'] = 'other';
90 -$wgSpecialPageGroups['ContestSignup'] = 'other';
91 -$wgSpecialPageGroups['ContestWelcome'] = 'other';
92 -$wgSpecialPageGroups['EditContest'] = 'other';
93 -$wgSpecialPageGroups['MyContests'] = 'other';
 87+$wgSpecialPageGroups['Contest'] = 'contest';
 88+$wgSpecialPageGroups['Contestant'] = 'contest';
 89+$wgSpecialPageGroups['Contests'] = 'contest';
 90+$wgSpecialPageGroups['ContestSignup'] = 'contest';
 91+$wgSpecialPageGroups['ContestWelcome'] = 'contest';
 92+$wgSpecialPageGroups['EditContest'] = 'contest';
 93+$wgSpecialPageGroups['MyContests'] = 'contest';
9494
9595 // API
9696 $wgAPIModules['deletecontest'] = 'ApiDeleteContest';
Index: trunk/extensions/Contest/includes/ContestDBObject.php
@@ -173,7 +173,7 @@
174174 $value = serialize( (array)$value );
175175 }
176176
177 - $values[$this->getFieldPrefix() . $name] = $value;
 177+ $values[$this->getFieldPrefix() . $name] = $value;
178178 }
179179 }
180180
@@ -354,7 +354,7 @@
355355
356356 $this->fields[$name] = $value;
357357 } else {
358 - throw new MWException( 'Attempted to set unknonw field ' . $name );
 358+ throw new MWException( 'Attempted to set unknown field ' . $name );
359359 }
360360 }
361361
Index: trunk/extensions/Contest/includes/Contest.class.php
@@ -411,7 +411,7 @@
412412
413413 if ( count( $contestantIds ) > 0 ) {
414414 $success = ContestComment::s()->delete( array( 'contestant_id' => $contestantIds ) ) && $success;
415 - $success = ContestVote::s()->delete( array( 'contestant_id' => $contestantIds ) ) && $success;
 415+ $success = ContestVote::s()->delete( array( 'contestant_id' => $contestantIds ) ) && $success;
416416 }
417417
418418 $success = ContestContestant::s()->delete( $condition ) && $success;

Status & tagging log