Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -224,8 +224,8 @@ |
225 | 225 | data.query.articlefeedback.length && |
226 | 226 | typeof data.query.articlefeedback[0].ratings !== 'undefined' |
227 | 227 | ) { |
228 | | - if ( 'expired' in data.query.articlefeedback[0] ) { |
229 | | - if ( data.query.articlefeedback[0].expired == true ) { |
| 228 | + if ( 'status' in data.query.articlefeedback[0] ) { |
| 229 | + if ( data.query.articlefeedback[0].status == 'expired' ) { |
230 | 230 | expired = true; |
231 | 231 | } |
232 | 232 | } |
Index: trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php |
— | — | @@ -104,6 +104,7 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | // Ratings can only be expired if the user has rated before |
| 108 | + $ratings[$params['pageid']]['status'] = 'current'; |
108 | 109 | if ( $params['userrating'] && $userRatedArticle ) { |
109 | 110 | $dbr = wfGetDb( DB_SLAVE ); |
110 | 111 | |
— | — | @@ -121,8 +122,8 @@ |
122 | 123 | ); |
123 | 124 | |
124 | 125 | if ( $res && $dbr->numRows( $res ) > $wgArticleFeedbackRatingLifetime ) { |
125 | | - // Include expired flag |
126 | | - $ratings[$params['pageid']]['expired'] = true; |
| 126 | + // Expired status |
| 127 | + $ratings[$params['pageid']]['status'] = 'expired'; |
127 | 128 | } |
128 | 129 | } |
129 | 130 | |