Index: trunk/extensions/Contest/specials/SpecialEditContest.php |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | $sessionField = 'contestid-' . $fields['name']; |
186 | 186 | |
187 | 187 | if ( is_null( $fields['id'] ) && !is_null( $this->getRequest()->getSessionData( $sessionField ) ) ) { |
188 | | - $contest->setId( $this->getRequest()->getSessionData( $sessionField ) ); |
| 188 | + $fields['id'] = $this->getRequest()->getSessionData( $sessionField ); |
189 | 189 | } |
190 | 190 | |
191 | 191 | $contest = new Contest( $fields, true ); |
Index: trunk/extensions/Contest/includes/Contest.class.php |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | 'id' => 'id', |
87 | 87 | 'name' => 'str', |
88 | 88 | 'status' => 'int', |
89 | | - 'submission_count' => 'int' |
| 89 | + 'submission_count' => 'int', |
90 | 90 | ); |
91 | 91 | } |
92 | 92 | |
Index: trunk/extensions/Contest/Contest.sql |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | CREATE TABLE IF NOT EXISTS /*_*/contest_contestants ( |
16 | 16 | contestant_id INT unsigned NOT NULL auto_increment PRIMARY KEY, -- Contestant id (unique id per user per contest) |
17 | 17 | contestant_contest_id SMALLINT unsigned NOT NULL, -- Foreign key on contests.contest_id |
| 18 | + contestant_challange_id INT unsigned NOT NULL, -- Foreign key on contest_challanges.challange_id |
18 | 19 | contestant_user_id INT(10) unsigned NOT NULL, -- Foreign key on user.user_id |
19 | 20 | |
20 | 21 | -- These fields will be copied from the user table on contest lock |
— | — | @@ -23,9 +24,19 @@ |
24 | 25 | |
25 | 26 | -- Extra contestant info |
26 | 27 | contestant_country VARCHAR(255) NOT NULL, -- Country of the contestant |
| 28 | + contestant_volunteer TINYINT unsigned NOT NULL, -- If the user is interested in voluneer oportunities |
| 29 | + contestant_wmf TINYINT unsigned NOT NULL, -- If the user is interested in a WMF job |
| 30 | + |
27 | 31 | contestant_submission INT(10) unsigned NOT NULL -- TODO: file shizzle |
28 | 32 | ) /*$wgDBTableOptions*/; |
29 | 33 | |
| 34 | +-- Challanges |
| 35 | +CREATE TABLE IF NOT EXISTS /*_*/contest_challanges ( |
| 36 | + challange_id INT unsigned NOT NULL auto_increment PRIMARY KEY, -- Challange id |
| 37 | + challange_contest_id INT unsigned NOT NULL, |
| 38 | + challange_text TEXT NOT NULL |
| 39 | +) /*$wgDBTableOptions*/; |
| 40 | + |
30 | 41 | -- Judge votes |
31 | 42 | CREATE TABLE IF NOT EXISTS /*_*/contest_votes ( |
32 | 43 | vote_id INT unsigned NOT NULL auto_increment PRIMARY KEY, |