Index: trunk/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql |
— | — | @@ -71,6 +71,7 @@ |
72 | 72 | CREATE INDEX /*i*/article_feedback_timestamp ON /*_*/aft_article_feedback (af_created); |
73 | 73 | CREATE INDEX /*i*/af_page_id ON /*_*/aft_article_feedback (af_page_id, af_created); |
74 | 74 | CREATE INDEX /*i*/af_page_feedback_id ON /*_*/aft_article_feedback (af_page_id, af_id); |
| 75 | +CREATE INDEX /*_*/af_net_helpfulness_af_id ON /*_*/aft_article_feedback (af_net_helpfulness, af_id); |
75 | 76 | |
76 | 77 | -- Allows for organizing fields into fieldsets, for reporting or rendering. |
77 | 78 | -- A group is just a name and an ID. |
Index: trunk/extensions/ArticleFeedbackv5/sql/alter.sql |
— | — | @@ -140,3 +140,7 @@ |
141 | 141 | |
142 | 142 | -- set has_comment appropriately from current values |
143 | 143 | UPDATE aft_article_feedback, aft_article_answer SET af_has_comment = TRUE WHERE af_bucket_id = 1 AND af_id = aa_feedback_id AND aa_response_text IS NOT NULL; |
| 144 | + |
| 145 | +-- Added 3/5 (emsmith)\ |
| 146 | +DROP INDEX /*_*/af_net_helpfulness_af_id; |
| 147 | +CREATE INDEX /*_*/af_net_helpfulness_af_id ON /*_*/aft_article_feedback (af_net_helpfulness, af_id); |
\ No newline at end of file |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | |
81 | 81 | public function fetchFeedback( $pageId, $filter = 'visible', |
82 | 82 | $filterValue = null, $sort = 'age', $sortOrder = 'desc', |
83 | | - $limit = 25, $continue = null, $continueId ) { |
| 83 | + $limit = 25, $continue = null, $continueId = null ) { |
84 | 84 | $dbr = wfGetDB( DB_SLAVE ); |
85 | 85 | $ids = array(); |
86 | 86 | $rows = array(); |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | case 'rating': |
119 | 119 | # TODO: null ratings don't seem to show up at all. Need to sort that one out. |
120 | 120 | $sortField = 'rating'; |
121 | | - $order = "rating $direction, af_id $direction"; |
| 121 | + $order = "yes_no $direction, af_id $direction"; |
122 | 122 | $continueSql = "(rating.aa_response_boolean $continueDirection ".intVal( $continue ) |
123 | 123 | ." OR (rating.aa_response_boolean = ".intVal( $continue ) |
124 | 124 | ." AND af_id $continueDirection ".intval( $continueId ).") )"; |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | array( |
160 | 160 | 'af_id', |
161 | 161 | 'af_net_helpfulness', |
162 | | - 'rating.aa_response_boolean AS rating' |
| 162 | + 'rating.aa_response_boolean AS yes_no' |
163 | 163 | ), |
164 | 164 | $where, |
165 | 165 | __METHOD__, |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | 'af_is_deleted', 'af_oversight_count', 'af_revision_id', |
216 | 216 | 'af_net_helpfulness', 'af_revision_id', |
217 | 217 | 'page_latest', 'page_title', 'page_namespace', |
218 | | - 'rating.aa_response_boolean AS rating', |
| 218 | + 'rating.aa_response_boolean AS yes_no', |
219 | 219 | 'af_hide_user_id', |
220 | 220 | 'af_hide_timestamp', |
221 | 221 | 'af_oversight_user_id', |