r98820 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98819‎ | r98820 | r98821 >
Date:22:42, 3 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added missing call to parent method and added help page field to contest edit page
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/includes/Contest.class.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContest.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialEditContest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -82,6 +82,7 @@
8383 'contest-edit-intro' => 'Introduction page',
8484 'contest-edit-oppertunities' => 'Oppertunities page',
8585 'contest-edit-rulespage' => 'Rules page',
 86+ 'contest-edit-help' => 'Help page',
8687 'contest-edit-exists-already' => 'Note: you are editing an already existing contest, not creating a new one.',
8788 'contest-edit-submit' => 'Submit',
8889
Index: trunk/extensions/Contest/specials/SpecialContest.php
@@ -126,7 +126,7 @@
127127 if ( $pager->getNumRows() ) {
128128 $out->addHTML(
129129 $pager->getNavigationBar() .
130 - $pager->getBody().
 130+ $pager->getBody() .
131131 $pager->getNavigationBar()
132132 );
133133 }
@@ -135,4 +135,4 @@
136136 }
137137 }
138138
139 -}
\ No newline at end of file
 139+}
Index: trunk/extensions/Contest/specials/SpecialEditContest.php
@@ -190,6 +190,11 @@
191191 'label-message' => 'contest-edit-rulespage',
192192 );
193193
 194+ $fields['help'] = array (
 195+ 'type' => 'text',
 196+ 'label-message' => 'contest-edit-help',
 197+ );
 198+
194199 if ( $contest !== false ) {
195200 foreach ( $fields as $name => $data ) {
196201 $fields[$name]['default'] = $contest->getField( $name );
Index: trunk/extensions/Contest/includes/Contest.class.php
@@ -382,6 +382,8 @@
383383 && $this->hasField( $name ) && $this->getField( $name ) != self::STATUS_FINISHED ) {
384384 $this->wasSetToFinished = true;
385385 }
 386+
 387+ parent::setField( $name, $value );
386388 }
387389
388390 /**

Status & tagging log