Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php |
— | — | @@ -102,9 +102,14 @@ |
103 | 103 | $ctaId = $ratingIds['cta_id']; |
104 | 104 | $feedbackId = $ratingIds['feedback_id']; |
105 | 105 | $this->saveUserProperties( $feedbackId ); |
106 | | - $this->updateRollupTables( $pageId, $revisionId, $userAnswers ); |
107 | | - $this->updateFilterCounts( $pageId, $userAnswers ); |
108 | 106 | |
| 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 | + |
109 | 114 | // If we have an email address, capture it |
110 | 115 | if ( $params['email'] ) { |
111 | 116 | $this->captureEmail ( $params['email'], FormatJson::encode( |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | $continueSql = "$sortField $continueDirection"; |
106 | 106 | break; |
107 | 107 | } |
108 | | - $order = "$sortField $direction"; |
| 108 | + $order = "$sortField $direction"; |
109 | 109 | |
110 | 110 | $where['af_page_id'] = $pageId; |
111 | 111 | |
— | — | @@ -115,6 +115,9 @@ |
116 | 116 | $where[] = $continueSql.' '.intVal( $continue ); |
117 | 117 | } |
118 | 118 | |
| 119 | + # This filter is per Fabrice, 1/25 - only show feedback from option 1 |
| 120 | + $where['af_bucket_id'] = 1; |
| 121 | + |
119 | 122 | /* I'd really love to do this in one big query, but MySQL |
120 | 123 | doesn't support LIMIT inside IN() subselects, and since |
121 | 124 | we don't know the number of answers for each feedback |
— | — | @@ -418,6 +421,7 @@ |
419 | 422 | ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_delete_count )->text() ) ); |
420 | 423 | } |
421 | 424 | |
| 425 | +/* |
422 | 426 | $link = null; |
423 | 427 | if ( $record[0]->af_needs_oversight ) { |
424 | 428 | if ( $can_delete ) { |
— | — | @@ -436,6 +440,7 @@ |
437 | 441 | 'class' => "articleFeedbackv5-$link-link" |
438 | 442 | ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_delete_count )->text() ) ); |
439 | 443 | } |
| 444 | +*/ |
440 | 445 | |
441 | 446 | $tools .= Html::closeElement( 'ul' ) |
442 | 447 | . Html::closeElement( 'div' ); |