r98146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98145‎ | r98146 | r98147 >
Date:17:35, 26 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some initial work
Modified paths:
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/Contest.settings.php (modified) (history)
  • /trunk/extensions/Contest/Contest.sql (added) (history)
  • /trunk/extensions/Contest/api (added) (history)
  • /trunk/extensions/Contest/api/ApiDeleteContest.php (added) (history)
  • /trunk/extensions/Contest/specials/SpecialContest.php (added) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSignup.php (added) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSubmission.php (added) (history)
  • /trunk/extensions/Contest/specials/SpecialContests.php (added) (history)

Diff [purge]

Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php
Property changes on: trunk/extensions/Contest/specials/SpecialContestSubmission.php
___________________________________________________________________
Added: svn:eol-style
11 + native
Index: trunk/extensions/Contest/specials/SpecialContest.php
Property changes on: trunk/extensions/Contest/specials/SpecialContest.php
___________________________________________________________________
Added: svn:eol-style
22 + native
Index: trunk/extensions/Contest/specials/SpecialContests.php
Property changes on: trunk/extensions/Contest/specials/SpecialContests.php
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php
Property changes on: trunk/extensions/Contest/specials/SpecialContestSignup.php
___________________________________________________________________
Added: svn:eol-style
44 + native
Index: trunk/extensions/Contest/Contest.settings.php
@@ -28,7 +28,7 @@
2929 */
3030 protected static function getDefaultSettings() {
3131 return array(
32 -
 32+ 'votevalues' => range( 0, 5 )
3333 );
3434 }
3535
Index: trunk/extensions/Contest/Contest.php
@@ -41,12 +41,40 @@
4242 'descriptionmsg' => 'contest-desc'
4343 );
4444
 45+// i18n
4546 $wgExtensionMessagesFiles['Contest'] = dirname( __FILE__ ) . '/Contest.i18n.php';
4647 $wgExtensionMessagesFiles['ContestAlias'] = dirname( __FILE__ ) . '/Contest.alias.php';
4748
 49+// Autoloading
4850 $wgAutoloadClasses['ContestHooks'] = dirname( __FILE__ ) . '/Contest.hooks.php';
4951 $wgAutoloadClasses['ContestSettings'] = dirname( __FILE__ ) . '/Contest.settings.php';
5052
 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
5179 $moduleTemplate = array(
5280 'localBasePath' => dirname( __FILE__ ) . '/resources',
5381 '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
14 + 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
134 + native

Status & tagging log