Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php |
Property changes on: trunk/extensions/Contest/specials/SpecialContestSubmission.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 1 | + native |
Index: trunk/extensions/Contest/specials/SpecialContest.php |
Property changes on: trunk/extensions/Contest/specials/SpecialContest.php |
___________________________________________________________________ |
Added: svn:eol-style |
2 | 2 | + native |
Index: trunk/extensions/Contest/specials/SpecialContests.php |
Property changes on: trunk/extensions/Contest/specials/SpecialContests.php |
___________________________________________________________________ |
Added: svn:eol-style |
3 | 3 | + native |
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php |
Property changes on: trunk/extensions/Contest/specials/SpecialContestSignup.php |
___________________________________________________________________ |
Added: svn:eol-style |
4 | 4 | + native |
Index: trunk/extensions/Contest/Contest.settings.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | protected static function getDefaultSettings() { |
31 | 31 | return array( |
32 | | - |
| 32 | + 'votevalues' => range( 0, 5 ) |
33 | 33 | ); |
34 | 34 | } |
35 | 35 | |
Index: trunk/extensions/Contest/Contest.php |
— | — | @@ -41,12 +41,40 @@ |
42 | 42 | 'descriptionmsg' => 'contest-desc' |
43 | 43 | ); |
44 | 44 | |
| 45 | +// i18n |
45 | 46 | $wgExtensionMessagesFiles['Contest'] = dirname( __FILE__ ) . '/Contest.i18n.php'; |
46 | 47 | $wgExtensionMessagesFiles['ContestAlias'] = dirname( __FILE__ ) . '/Contest.alias.php'; |
47 | 48 | |
| 49 | +// Autoloading |
48 | 50 | $wgAutoloadClasses['ContestHooks'] = dirname( __FILE__ ) . '/Contest.hooks.php'; |
49 | 51 | $wgAutoloadClasses['ContestSettings'] = dirname( __FILE__ ) . '/Contest.settings.php'; |
50 | 52 | |
| 53 | +$wgAutoloadClasses['ApiDeleteContest'] = dirname( __FILE__ ) . '/api/ApiDeleteContest.php'; |
| 54 | + |
| 55 | +$wgAutoloadClasses['SpecialContest'] = dirname( __FILE__ ) . '/specials/SpecialContest.php'; |
| 56 | +$wgAutoloadClasses['SpecialContests'] = dirname( __FILE__ ) . '/specials/SpecialContests.php'; |
| 57 | +$wgAutoloadClasses['SpecialContestSignup'] = dirname( __FILE__ ) . '/specials/SpecialContestSignup.php'; |
| 58 | +$wgAutoloadClasses['SpecialContestSubmission'] = dirname( __FILE__ ) . '/specials/SpecialContestSubmission.php'; |
| 59 | + |
| 60 | +// Special pages |
| 61 | +$wgSpecialPages['Contest'] = 'SpecialContest'; |
| 62 | +$wgSpecialPages['Contests'] = 'SpecialContests'; |
| 63 | +$wgSpecialPages['ContestSignup'] = 'SpecialContestSignup'; |
| 64 | +$wgSpecialPages['ContestSubmission'] = 'SpecialContestSubmission'; |
| 65 | + |
| 66 | +$wgSpecialPageGroups['Contest'] = 'other'; |
| 67 | +$wgSpecialPageGroups['Contests'] = 'other'; |
| 68 | +$wgSpecialPageGroups['ContestSignup'] = 'other'; |
| 69 | +$wgSpecialPageGroups['ContestSubmission'] = 'other'; |
| 70 | + |
| 71 | +// API |
| 72 | +$wgAPIModules['deletecontest'] = 'ApiDeleteContest'; |
| 73 | + |
| 74 | +// Hooks |
| 75 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'SurveyHooks::onSchemaUpdate'; |
| 76 | +$wgHooks['UnitTestsList'][] = 'SurveyHooks::registerUnitTests'; |
| 77 | + |
| 78 | +// Resource loader modules |
51 | 79 | $moduleTemplate = array( |
52 | 80 | 'localBasePath' => dirname( __FILE__ ) . '/resources', |
53 | 81 | 'remoteExtPath' => 'Contest/resources' |
Index: trunk/extensions/Contest/api/ApiDeleteContest.php |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +<?php |
| 3 | + |
Property changes on: trunk/extensions/Contest/api/ApiDeleteContest.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/extensions/Contest/Contest.sql |
— | — | @@ -0,0 +1,32 @@ |
| 2 | +-- MySQL version of the database schema for the Contest extension. |
| 3 | +-- Licence: GNU GPL v3+ |
| 4 | +-- Author: Jeroen De Dauw < jeroendedauw@gmail.com > |
| 5 | + |
| 6 | +-- Contests |
| 7 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/contests ( |
| 8 | + contest_id SMALLINT unsigned NOT NULL auto_increment PRIMARY KEY, |
| 9 | + contest_name VARCHAR(255) NOT NULL, -- String indentifier for the Contest |
| 10 | + contest_enabled TINYINT NOT NULL default '0', -- If the survey can be taken by users |
| 11 | +) /*$wgDBTableOptions*/; |
| 12 | + |
| 13 | +-- Contestants |
| 14 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/contest_contestants ( |
| 15 | + contestant_id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
| 16 | + contestant_contest_id SMALLINT unsigned NOT NULL, |
| 17 | + contestant_user_id INT(10) unsigned NOT NULL, |
| 18 | + |
| 19 | + contestant_full_name VARCHAR(255) NOT NULL, |
| 20 | + contestant_user_name VARCHAR(255) NOT NULL, |
| 21 | + contestant_email TINYBLOB NOT NULL, |
| 22 | + |
| 23 | + contestant_country VARCHAR(255) NOT NULL, |
| 24 | + contestant_submission INT(10) unsigned NOT NULL, -- TODO |
| 25 | +) /*$wgDBTableOptions*/; |
| 26 | + |
| 27 | +-- Judge votes |
| 28 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/contest_votes ( |
| 29 | + vote_id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
| 30 | + vote_contest_id SMALLINT unsigned NOT NULL, |
| 31 | + vote_contestant_id INT(10) unsigned NOT NULL, |
| 32 | + vote_user_id INT(10) unsigned NOT NULL, |
| 33 | +) /*$wgDBTableOptions*/; |
\ No newline at end of file |
Property changes on: trunk/extensions/Contest/Contest.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 34 | + native |