r71744 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71743‎ | r71744 | r71745 >
Date:20:27, 26 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r69807

Add pss_user_text
Modified paths:
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch-addusertext.sql (added) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.classes.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.classes.php
@@ -67,6 +67,7 @@
6868 array_merge(
6969 array(
7070 'pss_user' => $wgUser->getId(),
 71+ 'pss_user_text' => $wgUser->getName(),
7172 'pss_timestamp' => $now,
7273 'pss_name' => $name,
7374 '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
17 + native
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php
@@ -11,10 +11,15 @@
1212 /* Static Functions */
1313
1414 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' );
1721 return true;
1822 }
 23+
1924 public static function personalUrls( &$personal_urls, &$title ) {
2025 global $wgUser, $wgRequest;
2126 // Loads opt-in messages
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.sql
@@ -6,6 +6,9 @@
77 -- User ID
88 pss_user int NOT NULL,
99
 10+ -- User text
 11+ pss_user_text varchar(255) binary NOT NULL,
 12+
1013 -- Timestamp
1114 pss_timestamp binary(14) NOT NULL,
1215

Follow-up revisions

RevisionCommit summaryAuthorDate
r71752Followup r71744, r69807 Use getId/getName and store both...reedy21:04, 26 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69807Simple Survey classes, building off and modifying PrefSwitch in Usability Ini...nimishg18:22, 23 July 2010

Status & tagging log