r105017 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105016‎ | r105017 | r105018 >
Date:22:40, 2 December 2011
Author:gregchiasson
Status:ok (Comments)
Tags:aft 
Comment:
Changes to AFTv5 feedback page, per Fabrice - 25 records per page, show bucketID on feedback records, and put hide/abuse links on one line instead of 2. Also, fix a bug where the first rating field could show up twice.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -6,7 +6,7 @@
77 $.articleFeedbackv5special.page = hackPageId;
88 $.articleFeedbackv5special.filter = 'all';
99 $.articleFeedbackv5special.sort = 'newest';
10 - $.articleFeedbackv5special.limit = 5;
 10+ $.articleFeedbackv5special.limit = 25;
1111 $.articleFeedbackv5special.offset = 0;
1212 $.articleFeedbackv5special.showing = 0;
1313
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -92,7 +92,7 @@
9393 }
9494
9595 public function fetchFeedback( $pageId,
96 - $filter = 'visible', $order = 'newest', $limit = 5, $offset = 0 ) {
 96+ $filter = 'visible', $order = 'newest', $limit = 25, $offset = 0 ) {
9797 $dbr = wfGetDB( DB_SLAVE );
9898 $ids = array();
9999 $rows = array();
@@ -196,8 +196,8 @@
197197 default: $rv .= $this->renderNoBucket( $record ); break;
198198 }
199199 $rv .= "<p>
200 - <a href='#' class='aft5-hide-link' id='aft5-hide-link-$id'>Hide this (".$record[0]->af_hide_count.")</a>
201 -<br>
 200+ Option ".$record[0]->af_bucket_id." |
 201+ <a href='#' class='aft5-hide-link' id='aft5-hide-link-$id'>Hide this (".$record[0]->af_hide_count.")</a> |
202202 <a href='#' class='aft5-abuse-link' id='aft5-abuse-link-$id'>Flag as abuse (".$record[0]->af_abuse_count.")</a>
203203 </p>
204204 </div><hr>";
@@ -236,8 +236,8 @@
237237 private function renderBucket5( $record ) {
238238 $name = $record[0]->af_user_text;
239239 $rv = "$name had this to say about robocop:<ul>";
240 - foreach( $record as $answer ) {
241 - if( $answer->afi_data_type == 'rating' ) {
 240+ foreach( $record as $key => $answer ) {
 241+ if( $answer->afi_data_type == 'rating' && $key != '0' ) {
242242 $rv .= "<li>".$answer->afi_name.': '.$answer->aa_response_rating."</li>";
243243 }
244244 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r105029More internationalization on AFTv5 Feedback page.gregchiasson00:09, 3 December 2011

Comments

#Comment by Johnduhart (talk | contribs)   23:39, 2 December 2011
+		Option ".$record[0]->af_bucket_id." |
+		<a href='#' class='aft5-hide-link' id='aft5-hide-link-$id'>Hide this (".$record[0]->af_hide_count.")</a> |

Localize.

#Comment by Gregchiasson (talk | contribs)   01:04, 9 December 2011

Fixed in r105029 (which I neglected to mark as a followup to this) (also I don't know how, or can't remove the fixme status).

#Comment by P858snake (talk | contribs)   06:06, 10 December 2011

Can someone un-fixme and manually add the follow up?

Status & tagging log