Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -73,6 +73,7 @@ |
74 | 74 | 'articlefeedbackv5-special-showing' => '{{PLURAL:$1|1 feedback post|$1 feedback posts}} on this article', |
75 | 75 | 'articleFeedbackv5-comment-ago' => '$1 ago', |
76 | 76 | 'articlefeedbackv5-updates-since' => '{{PLURAL:$1|1 edit|$1 edits}} since post', |
| 77 | + 'articlefeedbackv5-revision-link' => 'View exact page', |
77 | 78 | 'articlefeedbackv5-special-more' => 'Show more posts', |
78 | 79 | 'articlefeedbackv5-special-pagetitle' => 'Feedback: $1', |
79 | 80 | 'articlefeedbackv5-form-optionid' => 'Option $1', |
— | — | @@ -333,6 +334,7 @@ |
334 | 335 | 'articlefeedbackv5-special-showing' => 'Text to show how many feedback psots have been posted to this article. $1 is the number of posts (needs plural support)', |
335 | 336 | 'articleFeedbackv5-comment-ago' => 'For posts less than 48 hours old, display a relative timestamp ("2 hours 19 minutes ago", eg). Formatting timestamp is in $1', |
336 | 337 | 'articlefeedbackv5-updates-since' => 'Number of edits made to this article since this feedback was posted. $1 is the number of edits. Requires plural support', |
| 338 | + 'articlefeedbackv5-revision-link' => 'Link to view the exact revision this user commented on (may be the current live page, or a historical revision).', |
337 | 339 | 'articlefeedbackv5-special-more' => '{{Identical|More}}', |
338 | 340 | 'articlefeedbackv5-special-pagetitle' => 'Page title for [[Special:ArticleFeedbackv5]]. Parameters: |
339 | 341 | * $1 is the title of the article for which we show the feedback', |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -185,8 +185,7 @@ |
186 | 186 | 'afi_data_type', 'af_created', 'user_name', |
187 | 187 | 'af_user_ip', 'af_is_hidden', 'af_abuse_count', |
188 | 188 | 'af_helpful_count', 'af_unhelpful_count', |
189 | | - 'af_is_deleted', 'af_needs_oversight', |
190 | | - '(SELECT COUNT(*) FROM ' . $dbr->tableName( 'revision' ) . ' WHERE rev_id > af_revision_id AND rev_page = ' . ( integer ) $pageId . ') AS age', |
| 189 | + 'af_is_deleted', 'af_needs_oversight', 'af_revision_id', |
191 | 190 | 'af_net_helpfulness', 'af_revision_id', |
192 | 191 | 'page_latest', 'page_title', 'page_namespace', |
193 | 192 | 'rating.aa_response_boolean AS rating' |
— | — | @@ -315,18 +314,12 @@ |
316 | 315 | $details = Html::openElement( 'div', array( |
317 | 316 | 'class' => 'articleFeedbackv5-comment-details-updates' |
318 | 317 | ) ); |
319 | | - if( $record[0]->age > 0 ) { |
320 | | - $details .= Linker::link( |
321 | | - Title::newFromRow( $record[0] ), |
322 | | - wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age )->escaped(), |
323 | | - array(), |
324 | | - array( |
325 | | - 'action' => 'historysubmit', |
326 | | - 'diff' => $record[0]->page_latest, |
327 | | - 'oldid' => $record[0]->af_revision_id |
328 | | - ) |
329 | | - ); |
330 | | - } |
| 318 | + $details .= Linker::link( |
| 319 | + Title::newFromRow( $record[0] ), |
| 320 | + wfMessage( 'articlefeedbackv5-revision-link' )->escaped(), |
| 321 | + array(), |
| 322 | + array( 'oldid' => $record[0]->af_revision_id ) |
| 323 | + ); |
331 | 324 | $details .= Html::closeElement( 'div' ); |
332 | 325 | |
333 | 326 | $footer_links = Html::openElement( 'div', array( |
— | — | @@ -398,7 +391,7 @@ |
399 | 392 | ) ); |
400 | 393 | |
401 | 394 | if ( $can_hide ) { |
402 | | - if ( $record[0]->af_is_hidden > 0 ) { |
| 395 | + if ( $record[0]->af_is_hidden ) { |
403 | 396 | $msg = 'unhide'; |
404 | 397 | } else { |
405 | 398 | $msg = 'hide'; |