Index: trunk/extensions/ArticleAssessmentPilot/js/ArticleAssessment.js |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | return randomstring; |
80 | 80 | } |
81 | 81 | userToken = randomString( 32 ); |
82 | | - $.cookie( 'mwArticleAssessmentUserToken', userToken ); |
| 82 | + $.cookie( 'mwArticleAssessmentUserToken', userToken, { 'expires': 30, 'path': '/' } ); |
83 | 83 | } |
84 | 84 | if ( !wgUserName ) { |
85 | 85 | config.userID = userToken; |
— | — | @@ -220,13 +220,13 @@ |
221 | 221 | $( '#article-assessment input[type=submit]' ) |
222 | 222 | .attr( 'disabled', 'disabled' ); |
223 | 223 | }, |
| 224 | + |
224 | 225 | // Request the ratings data for the current article |
225 | 226 | 'getRatingData': function() { |
226 | 227 | var config = $( '#article-assessment' ).data( 'articleAssessment-context' ).config; |
227 | 228 | var requestData = { |
228 | 229 | 'action': 'query', |
229 | 230 | 'list': 'articleassessment', |
230 | | - 'aarevid': config.revID, |
231 | 231 | 'aapageid': config.pageID, |
232 | 232 | 'aauserrating': 1, |
233 | 233 | 'format': 'json' |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | } |
269 | 269 | } |
270 | 270 | // if the rating is stale, add the stale class |
271 | | - if( data.query.articleassessment.stale ) { |
| 271 | + if( data.query.articleassessment[0].revid < wgCurRevisionId ) { |
272 | 272 | // add the stale star class to each on star |
273 | 273 | $( '.ui-stars-star-on' ) |
274 | 274 | .addClass( 'ui-stars-star-stale' ); |