Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.hooks.php |
— | — | @@ -37,6 +37,12 @@ |
38 | 38 | dirname( __FILE__ ) . '/sql/AddContestEmailFields.sql', |
39 | 39 | true |
40 | 40 | ) ); |
| 41 | + |
| 42 | + $updater->addExtensionUpdate( array( |
| 43 | + 'applyPatch', |
| 44 | + dirname( __FILE__ ) . '/sql/UpdateContestantRatingField.sql', |
| 45 | + true |
| 46 | + ) ); |
41 | 47 | |
42 | 48 | return true; |
43 | 49 | } |
Index: branches/wmf/1.18wmf1/extensions/Contest/sql/UpdateContestantRatingField.sql |
— | — | @@ -0,0 +1 @@ |
| 2 | +ALTER TABLE /*_*/contest_contestants MODIFY contestant_rating SMALLINT unsigned NOT NULL; |
\ No newline at end of file |
Property changes on: branches/wmf/1.18wmf1/extensions/Contest/sql/UpdateContestantRatingField.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContestant.php |
— | — | @@ -205,7 +205,7 @@ |
206 | 206 | $stats['rating'] = htmlspecialchars( wfMsgExt( |
207 | 207 | 'contest-contestant-rating', |
208 | 208 | 'parsemag', |
209 | | - $this->getLang()->formatNum( $contestant->getField( 'rating' ) ), |
| 209 | + $this->getLang()->formatNum( $contestant->getField( 'rating' ) / 100 ), |
210 | 210 | $this->getLang()->formatNum( $contestant->getField( 'rating_count' ) ) |
211 | 211 | ) ); |
212 | 212 | |
Index: branches/wmf/1.18wmf1/extensions/Contest/includes/ContestantPager.php |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | $value = htmlspecialchars( wfMsgExt( |
222 | 222 | 'contest-contestant-rating', |
223 | 223 | 'parsemag', |
224 | | - $this->getLang()->formatNum( $value ), |
| 224 | + $this->getLang()->formatNum( $value / 100 ), |
225 | 225 | $this->getLang()->formatNum( $this->mCurrentRow->contestant_rating_count ) |
226 | 226 | ) ); |
227 | 227 | break; |
Index: branches/wmf/1.18wmf1/extensions/Contest/includes/ContestContestant.php |
— | — | @@ -558,7 +558,7 @@ |
559 | 559 | } |
560 | 560 | |
561 | 561 | $this->setField( 'rating_count', $amount ); |
562 | | - $this->setField( 'rating', $amount > 0 ? $total / $amount : 0 ); |
| 562 | + $this->setField( 'rating', $amount > 0 ? $total / $amount * 100 : 0 ); |
563 | 563 | } |
564 | 564 | |
565 | 565 | /** |
Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.sql |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | |
43 | 43 | contestant_submission TINYBLOB NOT NULL, -- URL to the users submission |
44 | 44 | |
45 | | - contestant_rating TINYINT unsigned NOT NULL, -- The average rating of the contestant |
| 45 | + contestant_rating SMALLINT unsigned NOT NULL, -- The average rating of the contestant, multiplied by 100 for precision |
46 | 46 | contestant_rating_count SMALLINT unsigned NOT NULL, -- The number of ratings |
47 | 47 | contestant_comments SMALLINT unsigned NOT NULL -- The number of comments |
48 | 48 | ) /*$wgDBTableOptions*/; |
Property changes on: branches/wmf/1.18wmf1/extensions/Contest |
___________________________________________________________________ |
Added: svn:mergeinfo |
49 | 49 | Merged /branches/REL1_17/phase3/extensions/Contest:r81445,81448 |
50 | 50 | Merged /trunk/extensions/Contest:r99592,99653,100324 |
51 | 51 | Merged /branches/sqlite/extensions/Contest:r58211-58321 |
52 | 52 | Merged /trunk/phase3/extensions/Contest:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656 |
53 | 53 | Merged /branches/new-installer/phase3/extensions/Contest:r43664-66004 |
54 | 54 | Merged /branches/REL1_15/phase3/extensions/Contest:r51646 |