r100308 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100307‎ | r100308 | r100309 >
Date:00:50, 20 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Grab id and user_id of a user (prevents fatal on job execution)

Add some documentation
Modified paths:
  • /trunk/extensions/Contest/api/ApiMailContestants.php (modified) (history)
  • /trunk/extensions/Contest/includes/ContestReminderJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/includes/ContestReminderJob.php
@@ -33,6 +33,9 @@
3434 * @return bool
3535 */
3636 public function run() {
 37+ /**
 38+ * @var $contestant ContestContestant
 39+ */
3740 foreach ( $this->params['contestants'] as /* ContestContestant */ $contestant ) {
3841 $contestant->sendReminderEmail( $this->params['emailText'], array(
3942 'daysLeft' => $this->params['daysLeft'],
Index: trunk/extensions/Contest/api/ApiMailContestants.php
@@ -70,7 +70,7 @@
7171 $conditions['id'] = $params['ids'];
7272 }
7373
74 - $contestants = ContestContestant::s()->select( array( 'contest_id', 'email' ), $conditions );
 74+ $contestants = ContestContestant::s()->select( array( 'id', 'user_id', 'contest_id', 'email' ), $conditions );
7575
7676 if ( $contestants !== false && count( $contestants ) > 0 ) {
7777 $setSize = ContestSettings::get( 'reminderJobSize' );
@@ -169,7 +169,7 @@
170170 public function getDescription() {
171171 return array(
172172 'API module for mailing contestants. Selection criteria will be joined with AND,
173 - except for the challange ids/titles and contest ids/names pairs, which will be joined wit OR.'
 173+ except for the challange ids/titles and contest ids/names pairs, which will be joined with OR.'
174174 );
175175 }
176176
@@ -184,7 +184,7 @@
185185 'api.php?action=mailcontestants&ids=42',
186186 'api.php?action=mailcontestants&ids=4|2',
187187 'api.php?action=mailcontestants&contestids=42',
188 - 'api.php?action=mailcontestants&contestnames=Weekend of Code',
 188+ 'api.php?action=mailcontestants&contestnames=Weekend_of_Code',
189189 'api.php?action=mailcontestants&challengetitles=foo|bar|baz',
190190 );
191191 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r1003131.18wmf1 MFT r100295, r100302, r100307, r100308, r100309, r100311reedy01:03, 20 October 2011

Status & tagging log