r100320 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100319‎ | r100320 | r100321 >
Date:01:46, 20 October 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
override toString method since the base class one does not handle objects in the params field, so goes mad when jobs are run via MediaWiki::doJobs
Modified paths:
  • /trunk/extensions/Contest/includes/ContestDBObject.php (modified) (history)
  • /trunk/extensions/Contest/includes/ContestReminderJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/includes/ContestDBObject.php
@@ -332,7 +332,7 @@
333333 }
334334
335335 /**
336 - * Return the names of the fields.
 336+ * Return the names and values of the fields.
337337 *
338338 * @since 0.1
339339 *
Index: trunk/extensions/Contest/includes/ContestReminderJob.php
@@ -44,5 +44,20 @@
4545
4646 return true;
4747 }
 48+
 49+ function toString() {
 50+ $stringContestants = array();
 51+
 52+ /**
 53+ * @var $contestant ContestContestant
 54+ */
 55+ foreach ( $this->params['contestants'] as /* ContestContestant */ $contestant ) {
 56+ $stringContestants[] = FormatJson::encode( $contestant->getFields() );
 57+ }
 58+
 59+ return 'Contest reminder email for contest '
 60+ . $this->params['contest']->getId()
 61+ . ' for these ' . count( $this->params['contestants'] ) . ' contestants: ' . implode( ', ', $stringContestants ) . '.';
 62+ }
4863
4964 }

Status & tagging log