r114056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114055‎ | r114056 | r114057 >
Date:16:26, 17 March 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/EducationProgram/specials/SpecialEnroll.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
@@ -61,7 +61,7 @@
6262 if ( $course === false ) {
6363 $this->showWarning( wfMessage( 'ep-enroll-invalid-id' ) );
6464 }
65 - elseif ( $course->getStatus() === 'current' ) {
 65+ elseif ( in_array( $course->getStatus(), array( 'current', 'planned' ) ) ) {
6666 $this->setPageTitle( $course );
6767
6868 $token = '';
@@ -119,7 +119,7 @@
120120 $this->onSuccess();
121121 }
122122 else {
123 - $this->showEnrollmentForm( $course );
 123+ $this->showEnrollmentForm();
124124 }
125125 }
126126 else {
@@ -256,10 +256,8 @@
257257 * Create and display the enrollment form.
258258 *
259259 * @since 0.1
260 - *
261 - * @param EPCourse $course
262260 */
263 - protected function showEnrollmentForm( EPCourse $course ) {
 261+ protected function showEnrollmentForm() {
264262 $this->getOutput()->addWikiMsg( 'ep-enroll-header' );
265263
266264 $form = new HTMLForm( $this->getFormFields(), $this->getContext() );

Status & tagging log