r110369 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110368‎ | r110369 | r110370 >
Date:09:53, 31 January 2012
Author:catrope
Status:ok
Tags:aft 
Comment:
Add an index on article_field_option and remove a hardcoded IN()
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/sql/alter.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql
@@ -79,6 +79,7 @@
8080 afo_field_id integer unsigned NOT NULL,
8181 afo_name varchar(255) NOT NULL
8282 ) /*$wgDBTableOptions*/;
 83+CREATE INDEX /*i*/afo_field_id ON /*_*/aft_article_field_option (afo_field_id);
8384
8485 -- Stores individual answers for each feedback record - for a given feedback
8586 -- record, what did the user answer for each individual question/input on
Index: trunk/extensions/ArticleFeedbackv5/sql/alter.sql
@@ -114,3 +114,6 @@
115115 INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'invisible', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND af_is_hidden IS TRUE GROUP BY af_page_id;
116116 INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'visible', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND af_is_hidden IS FALSE AND af_is_deleted IS FALSE GROUP BY af_page_id;
117117 INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'deleted', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND af_is_deleted IS TRUE GROUP BY af_page_id;
 118+
 119+-- Added 1/31 (Roan)
 120+CREATE INDEX /*i*/afo_field_id ON /*_*/aft_article_field_option (afo_field_id);
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -296,7 +296,7 @@
297297 array(
298298 'arr_page_id' => $pageId,
299299 'arr_field_id = afi_id',
300 - "afi_name IN ('found', 'rating')"
 300+ 'afi_name' => array( 'found', 'rating' )
301301 )
302302 );
303303

Status & tagging log