Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | 'af_helpful_count', 'af_unhelpful_count', 'af_delete_count', |
157 | 157 | '(SELECT COUNT(*) FROM revision WHERE rev_id > af_revision_id AND rev_page = '.( integer ) $pageId.') AS age', |
158 | 158 | 'CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) AS net_helpfulness', |
159 | | - 'page_latest', 'af_revision_id' |
| 159 | + 'page_latest', 'af_revision_id', 'page_title' |
160 | 160 | ), |
161 | 161 | array( 'af_id' => $ids ), |
162 | 162 | __METHOD__, |
— | — | @@ -293,8 +293,7 @@ |
294 | 294 | 'class' => 'articleFeedbackv5-comment-details-updates' |
295 | 295 | ) ) |
296 | 296 | . Linker::link( |
297 | | -#TODO: take out that hardcoded thing. |
298 | | - Title::newFromText( 'Greg' ), |
| 297 | + Title::newFromText( $record[0]->page_title ), |
299 | 298 | wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age ), |
300 | 299 | array(), |
301 | 300 | array( |
— | — | @@ -363,19 +362,9 @@ |
364 | 363 | . Html::closeElement( 'ul' ) |
365 | 364 | . Html::closeElement( 'div' ); |
366 | 365 | |
367 | | - # Only set a wrapper class for bucket 1. |
368 | | - $class = ''; |
369 | | - if( array_key_exists( 'found', $record ) ) { |
370 | | - if ( $record['found']->aa_response_boolean ) { |
371 | | - $class = 'positive'; |
372 | | - } else { |
373 | | - $class = 'negative'; |
374 | | - } |
375 | | - } |
376 | | - |
377 | 366 | return Html::openElement( 'div', array( 'class' => 'articleFeedbackv5-feedback' ) ) |
378 | 367 | . Html::openElement( 'div', array( |
379 | | - 'class' => "articleFeedbackv5-comment-wrap $class" |
| 368 | + 'class' => "articleFeedbackv5-comment-wrap" |
380 | 369 | ) ) |
381 | 370 | . $content |
382 | 371 | . $footer_links |
— | — | @@ -416,8 +405,6 @@ |
417 | 406 | . '</blockquote>'; |
418 | 407 | } |
419 | 408 | |
420 | | - # TODO: The headers here really need the same treatment as bucket1, with |
421 | | - # the links and such. |
422 | 409 | private function renderBucket3( $record ) { |
423 | 410 | $name = htmlspecialchars( $record[0]->user_name ); |
424 | 411 | $rating = htmlspecialchars( $record['rating']->aa_response_rating ); |
— | — | @@ -488,18 +475,19 @@ |
489 | 476 | |
490 | 477 | private function feedbackHead( $message, $class, $record, $extra = '' ) { |
491 | 478 | $gender = ''; #? |
492 | | - $name = htmlspecialchars( $record->user_name ); |
493 | | - $link = $record->af_user_id ? "User:$name" : "Special:Contributions/$name"; |
494 | | - $html = Html::openElement( 'h3' ) |
| 479 | + $name = htmlspecialchars( $record->user_name ); |
| 480 | + $link = $record->af_user_id ? "User:$name" : "Special:Contributions/$name"; |
| 481 | + |
| 482 | + return Html::openElement( 'h3', array( |
| 483 | + 'class' => $class |
| 484 | + ) ) |
495 | 485 | . Html::element( 'span', array( 'class' => 'icon' ) ) |
496 | 486 | . Linker::link( Title::newFromText( $link ), $name ) |
497 | 487 | . Html::element( 'span', |
498 | | - array( 'class' => $class ), |
| 488 | + array( 'class' => 'result' ), |
499 | 489 | wfMessage( $message, $gender, $extra )->escaped() |
500 | 490 | ) |
501 | 491 | . Html::closeElement( 'h3' ); |
502 | | - |
503 | | - return $html; |
504 | 492 | } |
505 | 493 | |
506 | 494 | /** |