Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.classes.php |
— | — | @@ -67,6 +67,7 @@ |
68 | 68 | array_merge( |
69 | 69 | array( |
70 | 70 | 'pss_user' => $wgUser->getId(), |
| 71 | + 'pss_user_text' => $wgUser->getName(), |
71 | 72 | 'pss_timestamp' => $now, |
72 | 73 | 'pss_name' => $name, |
73 | 74 | 'pss_question' => $question, |
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch-addusertext.sql |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +-- |
| 3 | +-- Schema update for OptIn |
| 4 | +-- |
| 5 | + |
| 6 | +ALTER TABLE /*_*/prefswitch_survey ADD COLUMN pss_user_text varchar(255) binary NOT NULL AFTER pss_user; |
\ No newline at end of file |
Property changes on: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch-addusertext.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 7 | + native |
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php |
— | — | @@ -11,10 +11,15 @@ |
12 | 12 | /* Static Functions */ |
13 | 13 | |
14 | 14 | public static function schema() { |
15 | | - global $wgExtNewTables; |
16 | | - $wgExtNewTables[] = array( 'prefswitch_survey', dirname( __FILE__ ) . '/PrefSwitch.sql' ); |
| 15 | + global $wgExtNewTables, $wgExtModifiedFields; |
| 16 | + |
| 17 | + $dir = dirname( __FILE__ ); |
| 18 | + |
| 19 | + $wgExtNewTables[] = array( 'prefswitch_survey', $dir . '/PrefSwitch.sql' ); |
| 20 | + $wgExtModifiedFields[] = array( '', '', $dir . '/PrefSwitch-addusertext.sql' ); |
17 | 21 | return true; |
18 | 22 | } |
| 23 | + |
19 | 24 | public static function personalUrls( &$personal_urls, &$title ) { |
20 | 25 | global $wgUser, $wgRequest; |
21 | 26 | // Loads opt-in messages |
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.sql |
— | — | @@ -6,6 +6,9 @@ |
7 | 7 | -- User ID |
8 | 8 | pss_user int NOT NULL, |
9 | 9 | |
| 10 | + -- User text |
| 11 | + pss_user_text varchar(255) binary NOT NULL, |
| 12 | + |
10 | 13 | -- Timestamp |
11 | 14 | pss_timestamp binary(14) NOT NULL, |
12 | 15 | |