r100195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100194‎ | r100195 | r100196 >
Date:00:41, 19 October 2011
Author:reedy
Status:old
Tags:
Comment:
1.18wmf1 MFT r100190, r100191, r100193
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/Contest (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/Contest.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/Contest.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/Contest.settings.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/api/ApiContestQuery.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContestPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContests.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialMyContests.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/test/ContestValidationTests.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/Contest/test/ContestValidationTests.php
@@ -33,8 +33,8 @@
3434 'https://gitorious.org/statusnet/mainline/merge_requests/2224' => true,
3535 );
3636
37 - foreach ( $tests as $test => $isValdid ) {
38 - if ( $isValdid ) {
 37+ foreach ( $tests as $test => $isValid ) {
 38+ if ( $isValid ) {
3939 $this->assertEquals( true, SpecialMyContests::validateSubmissionField( $test ) );
4040 }
4141 else {
Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.i18n.php
@@ -25,7 +25,7 @@
2626
2727 // Rights
2828 'right-contestadmin' => 'Manage contests',
29 - 'right-contestparticipant' => 'Participate in contests',
 29+ 'right-contestant' => 'Participate in contests',
3030 'right-contestjudge' => 'Judge contest submissions',
3131
3232 // Groups
@@ -33,9 +33,9 @@
3434 'group-contestadmin-member' => '{{GENDER:$1|contest admin}}',
3535 'grouppage-contestadmin' => 'Project:Contest_admins',
3636
37 - 'group-contestparticipant' => 'Contest participants',
38 - 'group-contestparticipant-member' => '{{GENDER:$1|contest participant}}',
39 - 'grouppage-contestparticipant' => 'Project:Contest_participants',
 37+ 'group-contestant' => 'Contestant',
 38+ 'group-contestant-member' => '{{GENDER:$1|Contestant}}',
 39+ 'grouppage-contestant' => 'Project:Contestant',
4040
4141 'group-contestjudge' => 'Contest judges',
4242 'group-contestjudge-member' => '{{GENDER:$1|contest judge}}',
@@ -296,14 +296,14 @@
297297 'contest-desc' => 'Ermöglicht Wettbewerbe sowie die anschließende Ermittlung der Gewinner durch Juroren',
298298 'contest-toplink' => 'Meine Wettbewerbe',
299299 'right-contestadmin' => 'Wettbewerbe verwalten',
300 - 'right-contestparticipant' => 'An Wettbewerben teilnehmen',
 300+ 'right-contestant' => 'An Wettbewerben teilnehmen',
301301 'right-contestjudge' => 'Wettbewerbsbeiträge beurteilen',
302302 'group-contestadmin' => 'Wettbewerbsadministratoren',
303303 'group-contestadmin-member' => '{{GENDER:$1|Wettbewerbsadministrator|Wettbewerbsadministratorin}}',
304304 'grouppage-contestadmin' => 'Project:Wettbewerbsadministratoren',
305 - 'group-contestparticipant' => 'Wettbewerbsteilnehmer',
306 - 'group-contestparticipant-member' => '{{GENDER:$1|Wettbewerbsteilnehmer|Wettbewerbsteilnehmerin}}',
307 - 'grouppage-contestparticipant' => 'Project:Wettbewerbsteilnehmer',
 305+ 'group-contestant' => 'Wettbewerbsteilnehmer',
 306+ 'group-contestant-member' => '{{GENDER:$1|Wettbewerbsteilnehmer|Wettbewerbsteilnehmerin}}',
 307+ 'grouppage-contestant' => 'Project:Wettbewerbsteilnehmer',
308308 'group-contestjudge' => 'Wettbewerbsjuroren',
309309 'group-contestjudge-member' => '{{GENDER:$1|Wettbewerbsjuror|Wettbewerbsjurorin}}',
310310 'grouppage-contestjudge' => 'Project:Wettbewerbsjuroren',
@@ -480,14 +480,14 @@
481481 'contest-desc' => 'Extension de concours qui permet aux utilisateurs de participer à des défis de concours organisés par un administrateur. Via une interface de jugement, les juges peuvent discuter et voter sur les propositions.',
482482 'contest-toplink' => 'Mes concours',
483483 'right-contestadmin' => 'Gérer les concours',
484 - 'right-contestparticipant' => 'Participer aux concours',
 484+ 'right-contestant' => 'Participer aux concours',
485485 'right-contestjudge' => 'Juger les réponses au concours',
486486 'group-contestadmin' => 'Administrateurs du concours',
487487 'group-contestadmin-member' => '{{GENDER:$1|administrateur du concours}}',
488488 'grouppage-contestadmin' => 'Project:Contest_admins',
489 - 'group-contestparticipant' => 'Participants au concours',
490 - 'group-contestparticipant-member' => '{{GENDER:$1|participant au concours}}',
491 - 'grouppage-contestparticipant' => 'Project:Contest_participants',
 489+ 'group-contestant' => 'Participants au concours',
 490+ 'group-contestant-member' => '{{GENDER:$1|participant au concours}}',
 491+ 'grouppage-contestant' => 'Project:Contest_participants',
492492 'group-contestjudge' => 'Juges du concours',
493493 'group-contestjudge-member' => '{{GENDER:$1|juge du concours}}',
494494 'grouppage-contestjudge' => 'Project:Contest_judges',
@@ -635,14 +635,14 @@
636636 'contest-desc' => 'Permitte al usatores de participar in concursos definite per administratores. Via un interfacie de judicamento, le judices pote discuter e votar sur submissiones.',
637637 'contest-toplink' => 'Mi concursos',
638638 'right-contestadmin' => 'Gerer concursos',
639 - 'right-contestparticipant' => 'Participar in concursos',
 639+ 'right-contestant' => 'Participar in concursos',
640640 'right-contestjudge' => 'Judicar submissiones de concurso',
641641 'group-contestadmin' => 'Administratores de concurso',
642642 'group-contestadmin-member' => '{{GENDER:$1|administrator|administratrice}} de concurso',
643643 'grouppage-contestadmin' => 'Project:Administratores de concurso',
644 - 'group-contestparticipant' => 'Participantes del concurso',
645 - 'group-contestparticipant-member' => '{{GENDER:$1|participante}} de concurso',
646 - 'grouppage-contestparticipant' => 'Project:Participantes de concurso',
 644+ 'group-contestant' => 'Participantes del concurso',
 645+ 'group-contestant-member' => '{{GENDER:$1|participante}} de concurso',
 646+ 'grouppage-contestant' => 'Project:Participantes de concurso',
647647 'group-contestjudge' => 'Judices de concurso',
648648 'group-contestjudge-member' => '{{GENDER:$1|judice}} de concurso',
649649 'grouppage-contestjudge' => 'Project:Judices de concurso',
@@ -790,14 +790,14 @@
791791 'contest-desc' => 'Додаток што им овозможува на корисниците да учествуваат во конкурси (задачи) приредени од администраторите. Жири комисијата има свој посредник за дискутирање и гласање за поднесеното.',
792792 'contest-toplink' => 'Мои конкурси',
793793 'right-contestadmin' => 'Раководење со конкурси',
794 - 'right-contestparticipant' => 'Учество во конкурси',
 794+ 'right-contestant' => 'Учество во конкурси',
795795 'right-contestjudge' => 'Оценување на учесници во конкурс',
796796 'group-contestadmin' => 'Конкурсни администратори',
797797 'group-contestadmin-member' => '{{GENDER:$1|конкурсен администратор}}',
798798 'grouppage-contestadmin' => 'Project:Конкурсни_администратори',
799 - 'group-contestparticipant' => 'Учесници во конкурси',
800 - 'group-contestparticipant-member' => '{{GENDER:$1|учесник во конкурси}}',
801 - 'grouppage-contestparticipant' => 'Project:Учесници_во_конкурси',
 799+ 'group-contestant' => 'Учесници во конкурси',
 800+ 'group-contestant-member' => '{{GENDER:$1|учесник во конкурси}}',
 801+ 'grouppage-contestant' => 'Project:Учесници_во_конкурси',
802802 'group-contestjudge' => 'Конкурсно жири',
803803 'group-contestjudge-member' => '{{GENDER:$1|член на конкурсно жири}}',
804804 'grouppage-contestjudge' => 'Project:Конкурсно_жири',
@@ -944,13 +944,13 @@
945945 $messages['nl'] = array(
946946 'contest-toplink' => 'Mijn wedstrijden',
947947 'right-contestadmin' => 'Wedstrijden beheren',
948 - 'right-contestparticipant' => 'Deelnemen aan wedstrijden',
 948+ 'right-contestant' => 'Deelnemen aan wedstrijden',
949949 'group-contestadmin' => 'Wedstrijdbeheerders',
950950 'group-contestadmin-member' => '{{GENDER:$1|wedstrijdbeheerder}}',
951951 'grouppage-contestadmin' => 'Project:Wedstrijdbeheerders',
952 - 'group-contestparticipant' => 'Wedstrijddeelnemers',
953 - 'group-contestparticipant-member' => '{{GENDER:$1|wedstrijddeelnemer|wedstrijddeelneemster}}',
954 - 'grouppage-contestparticipant' => 'Project:Wedstrijddeelnemers',
 952+ 'group-contestant' => 'Wedstrijddeelnemers',
 953+ 'group-contestant-member' => '{{GENDER:$1|wedstrijddeelnemer|wedstrijddeelneemster}}',
 954+ 'grouppage-contestant' => 'Project:Wedstrijddeelnemers',
955955 'prefs-contest' => 'Wedstrijden',
956956 'contest-prefs-showtoplink' => 'Een verwijzing naar [[Special:MyContests|mijn wedstrijden]] weergeven in het bovenste menu.',
957957 'contest-status-draft' => 'Ontwerp (uitgeschakeld)',
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialMyContests.php
@@ -21,7 +21,7 @@
2222 * @since 0.1
2323 */
2424 public function __construct() {
25 - parent::__construct( 'MyContests', 'contestparticipant' );
 25+ parent::__construct( 'MyContests', 'contestant' );
2626 }
2727
2828 /**
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContestPage.php
@@ -125,7 +125,7 @@
126126
127127 $pages['contest-nav-contestwelcome'] = array( 'ContestWelcome', $contestName );
128128
129 - if ( $user->isAllowed( 'contestparticipant' ) ) {
 129+ if ( $user->isAllowed( 'contestant' ) ) {
130130 $pages['contest-nav-contestsignup'] = array( 'ContestSignup', $contestName );
131131 }
132132
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContests.php
@@ -165,7 +165,7 @@
166166
167167 $fields = array();
168168
169 - if ( $user->isAllowed( 'contestparticipant' ) ) {
 169+ if ( $user->isAllowed( 'contestant' ) ) {
170170 $name = Html::element(
171171 'a',
172172 array(
@@ -237,7 +237,7 @@
238238 wfMsg( 'contest-nav-contestwelcome' )
239239 );
240240
241 - if ( $user->isAllowed( 'contestparticipant' ) ) {
 241+ if ( $user->isAllowed( 'contestant' ) ) {
242242 $links[] = Html::element(
243243 'a',
244244 array(
Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.settings.php
@@ -21,9 +21,9 @@
2222 /**
2323 * Returns the default values for the settings.
2424 * setting name (string) => setting value (mixed)
25 - *
 25+ *
2626 * @since 0.1
27 - *
 27+ *
2828 * @return array
2929 */
3030 protected static function getDefaultSettings() {
@@ -39,9 +39,9 @@
4040 * Retruns an array with all settings after making sure they are
4141 * initialized (ie set settings have been merged with the defaults).
4242 * setting name (string) => setting value (mixed)
43 - *
 43+ *
4444 * @since 0.1
45 - *
 45+ *
4646 * @return array
4747 */
4848 public static function getSettings() {
@@ -59,21 +59,21 @@
6060
6161 /**
6262 * Gets the value of the specified setting.
63 - *
 63+ *
6464 * @since 0.1
65 - *
 65+ *
6666 * @param string $settingName
67 - *
 67+ *
6868 * @throws MWException
6969 * @return mixed
7070 */
7171 public static function get( $settingName ) {
7272 $settings = self::getSettings();
73 -
 73+
7474 if ( !array_key_exists( $settingName, $settings ) ) {
7575 throw new MWException( 'Attempt to get non-existing setting "' . $settingName . '"' );
7676 }
77 -
 77+
7878 return $settings[$settingName];
7979 }
8080
Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.php
@@ -112,7 +112,7 @@
113113 // Rights
114114
115115 $wgAvailableRights[] = 'contestadmin';
116 -$wgAvailableRights[] = 'contestparticipant';
 116+$wgAvailableRights[] = 'contestant';
117117 $wgAvailableRights[] = 'contestjudge';
118118
119119 # Users that can manage the contests.
@@ -124,12 +124,12 @@
125125 $wgGroupPermissions['contestadmin' ]['contestadmin'] = true;
126126
127127 # Users that can be contest participants.
128 -$wgGroupPermissions['*' ]['contestparticipant'] = false;
129 -$wgGroupPermissions['user' ]['contestparticipant'] = true;
130 -//$wgGroupPermissions['autoconfirmed']['contestparticipant'] = true;
131 -//$wgGroupPermissions['bot' ]['contestparticipant'] = false;
132 -$wgGroupPermissions['sysop' ]['contestparticipant'] = true;
133 -$wgGroupPermissions['contestparticipant']['contestparticipant'] = true;
 128+$wgGroupPermissions['*' ]['contestant'] = false;
 129+$wgGroupPermissions['user' ]['contestant'] = true;
 130+//$wgGroupPermissions['autoconfirmed']['contestant'] = true;
 131+//$wgGroupPermissions['bot' ]['contestant'] = false;
 132+$wgGroupPermissions['sysop' ]['contestant'] = true;
 133+$wgGroupPermissions['contestant']['contestant'] = true;
134134
135135 # Users that can vote and comment on submissions.
136136 $wgGroupPermissions['*' ]['contestjudge'] = false;
Index: branches/wmf/1.18wmf1/extensions/Contest/api/ApiContestQuery.php
@@ -229,6 +229,7 @@
230230 */
231231 public function getPossibleErrors() {
232232 return array_merge( parent::getPossibleErrors(), array(
 233+ array( 'badaccess-groups' ),
233234 ) );
234235 }
235236
Property changes on: branches/wmf/1.18wmf1/extensions/Contest
___________________________________________________________________
Added: svn:mergeinfo
236237 Merged /branches/REL1_17/phase3/extensions/Contest:r81445,81448
237238 Merged /trunk/extensions/Contest:r99592,99653,100190-100191,100193
238239 Merged /branches/sqlite/extensions/Contest:r58211-58321
239240 Merged /trunk/phase3/extensions/Contest:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656
240241 Merged /branches/new-installer/phase3/extensions/Contest:r43664-66004
241242 Merged /branches/REL1_15/phase3/extensions/Contest:r51646

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100190Fix typo...reedy23:58, 18 October 2011
r100191Add badaccess-groups to getPossibleErrorsreedy00:03, 19 October 2011
r100193Swap "Contest Participant" for contestant...reedy00:29, 19 October 2011

Status & tagging log