r110076 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110075‎ | r110076 | r110077 >
Date:20:36, 26 January 2012
Author:gregchiasson
Status:ok
Tags:aft 
Comment:
AFT5 - code changes to support only counting option 1 in the rollups and only showing option 1 on the feedback page. Comment out the 'request oversight' link. Both changes per feedback we got yesterday.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -102,9 +102,14 @@
103103 $ctaId = $ratingIds['cta_id'];
104104 $feedbackId = $ratingIds['feedback_id'];
105105 $this->saveUserProperties( $feedbackId );
106 - $this->updateRollupTables( $pageId, $revisionId, $userAnswers );
107 - $this->updateFilterCounts( $pageId, $userAnswers );
108106
 107+ // Per Fabrice 1/25, FeedbackPage only cares about option 1, so
 108+ // don't bother updating the rollups if this is a different one.
 109+ if( $bucket == 1 ) {
 110+ $this->updateRollupTables( $pageId, $revisionId, $userAnswers );
 111+ $this->updateFilterCounts( $pageId, $userAnswers );
 112+ }
 113+
109114 // If we have an email address, capture it
110115 if ( $params['email'] ) {
111116 $this->captureEmail ( $params['email'], FormatJson::encode(
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -104,7 +104,7 @@
105105 $continueSql = "$sortField $continueDirection";
106106 break;
107107 }
108 - $order = "$sortField $direction";
 108+ $order = "$sortField $direction";
109109
110110 $where['af_page_id'] = $pageId;
111111
@@ -115,6 +115,9 @@
116116 $where[] = $continueSql.' '.intVal( $continue );
117117 }
118118
 119+ # This filter is per Fabrice, 1/25 - only show feedback from option 1
 120+ $where['af_bucket_id'] = 1;
 121+
119122 /* I'd really love to do this in one big query, but MySQL
120123 doesn't support LIMIT inside IN() subselects, and since
121124 we don't know the number of answers for each feedback
@@ -418,6 +421,7 @@
419422 ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_delete_count )->text() ) );
420423 }
421424
 425+/*
422426 $link = null;
423427 if ( $record[0]->af_needs_oversight ) {
424428 if ( $can_delete ) {
@@ -436,6 +440,7 @@
437441 'class' => "articleFeedbackv5-$link-link"
438442 ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_delete_count )->text() ) );
439443 }
 444+*/
440445
441446 $tools .= Html::closeElement( 'ul' )
442447 . Html::closeElement( 'div' );

Status & tagging log