Index: trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php |
— | — | @@ -205,7 +205,7 @@ |
206 | 206 | // check if we've got results in the cache |
207 | 207 | $key = wfMemcKey( 'article_feedback_stats_highs_lows' ); |
208 | 208 | $cache = $wgMemc->get( $key ); |
209 | | - if ( $cache != false && $cache = -1 ) { |
| 209 | + if ( $cache != false && $cache == -1 ) { |
210 | 210 | $result = $cache; |
211 | 211 | } else { |
212 | 212 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql |
— | — | @@ -35,7 +35,6 @@ |
36 | 36 | PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token) |
37 | 37 | ) /*$wgDBTableOptions*/; |
38 | 38 | CREATE INDEX /*i*/aa_user_page_revision ON /*_*/article_feedback (aa_user_id, aa_page_id, aa_revision); |
39 | | -CREATE INDEX /*i*/aa_timestamp ON /*_*/article_feedback (aa_timestamp); |
40 | 39 | |
41 | 40 | -- Aggregate rating table for a page |
42 | 41 | CREATE TABLE IF NOT EXISTS /*_*/article_feedback_pages ( |
Index: trunk/extensions/ArticleFeedback/sql/AddArticleFeedbackTimestampIndex.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +-- Create an index on the article_feedback.aa_timestamp field |
| 3 | +CREATE INDEX /*i*/article_feedback_timestamp ON /*_*/article_feedback (aa_timestamp); |
\ No newline at end of file |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -178,6 +178,13 @@ |
179 | 179 | $dir . '/sql/AddStatsHighsLowsTable.sql', |
180 | 180 | true |
181 | 181 | ) ); |
| 182 | + $updater->addExtensionUpdate( array( |
| 183 | + 'addIndex', |
| 184 | + 'article_feedback', |
| 185 | + 'article_feedback_timestamp', |
| 186 | + $dir . '/sql/AddArticleFeedbackTimestampIndex.sql', |
| 187 | + true |
| 188 | + ) ); |
182 | 189 | } |
183 | 190 | return true; |
184 | 191 | } |