r103407 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103406‎ | r103407 | r103408 >
Date:23:26, 16 November 2011
Author:gregchiasson
Status:deferred
Tags:
Comment:
Schema change to AFT5 - include bucket ID in fields table, and allow duplicate names. Will allow for loading fields from database, instead of config. Also, bug fix for bad function name in API.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql
@@ -46,10 +46,11 @@
4747 -- We already used af_ above, so this is ArticleFIeld instead
4848 CREATE TABLE IF NOT EXISTS /*_*/aft_article_field (
4949 afi_id integer unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
50 - afi_name varchar(255) NOT NULL UNIQUE,
 50+ afi_name varchar(255) NOT NULL,
5151 afi_data_type ENUM('text', 'boolean', 'rating', 'select'),
5252 -- FKey to article_field_groups.group_id
53 - afi_group_id integer unsigned NULL
 53+ afi_group_id integer unsigned NULL,
 54+ afi_bucket_id integer unsigned NOT NULL
5455 ) /*$wgDBTableOptions*/;
5556
5657 CREATE TABLE IF NOT EXISTS /*_*/aft_article_field_option (
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -73,7 +73,7 @@
7474 );
7575 }
7676
77 - protected function validateParams($value, $type) {
 77+ protected function validateParam($value, $type) {
7878 # rating: int between 1 and 5 (inclusive)
7979 # boolean: 1 or 0
8080 # option: option exists

Status & tagging log