http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98813
Revision: 98813 Author: jeroendedauw Date: 2011-10-03 22:06:09 +0000 (Mon, 03 Oct 2011) Log Message: ----------- follow up to r98811 Modified Paths: -------------- trunk/extensions/Contest/Contest.php trunk/extensions/Contest/includes/ContestComment.php trunk/extensions/Contest/includes/ContestVote.php Modified: trunk/extensions/Contest/Contest.php =================================================================== --- trunk/extensions/Contest/Contest.php 2011-10-03 22:04:04 UTC (rev 98812) +++ trunk/extensions/Contest/Contest.php 2011-10-03 22:06:09 UTC (rev 98813) @@ -57,6 +57,7 @@ $wgAutoloadClasses['ContestComment'] = dirname( __FILE__ ) . '/includes/ContestComment.php'; $wgAutoloadClasses['ContestContestant'] = dirname( __FILE__ ) . '/includes/ContestContestant.php'; $wgAutoloadClasses['ContestDBObject'] = dirname( __FILE__ ) . '/includes/ContestDBObject.php'; +$wgAutoloadClasses['ContestVote'] = dirname( __FILE__ ) . '/includes/ContestVote.php'; $wgAutoloadClasses['SpecialContest'] = dirname( __FILE__ ) . '/specials/SpecialContest.php'; $wgAutoloadClasses['SpecialContestPage'] = dirname( __FILE__ ) . '/specials/SpecialContestPage.php'; Modified: trunk/extensions/Contest/includes/ContestComment.php =================================================================== --- trunk/extensions/Contest/includes/ContestComment.php 2011-10-03 22:04:04 UTC (rev 98812) +++ trunk/extensions/Contest/includes/ContestComment.php 2011-10-03 22:06:09 UTC (rev 98813) @@ -112,9 +112,8 @@ $success = parent::insertIntoDB(); if ( $success ) { - ContestContestant::s() - ->select( 'id', array( 'id' => $this->getField( 'contestant_id' ) ) ) - ->addToField( 'comments', 1 ); + $contestant = new ContestContestant( array( 'id' => $this->getField( 'contestant_id' ) ) ); + $contestant->addToField( 'comments', 1 ); } return $success; Modified: trunk/extensions/Contest/includes/ContestVote.php =================================================================== --- trunk/extensions/Contest/includes/ContestVote.php 2011-10-03 22:04:04 UTC (rev 98812) +++ trunk/extensions/Contest/includes/ContestVote.php 2011-10-03 22:06:09 UTC (rev 98813) @@ -109,9 +109,9 @@ $success = parent::writeToDB(); if ( $success ) { - return ContestContestant::s() - ->select( null, array( 'id' => $this->getField( 'contestant_id' ) ) ) - ->updateVotes(); + $contestant = new ContestContestant( array( 'id' => $this->getField( 'contestant_id' ) ) ); + $contestant->updateVotes(); + $contestant->writeToDB(); } return $success; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs