r109774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109773‎ | r109774 | r109775 >
Date:22:26, 22 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed several issues
Modified paths:
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPMC.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPStudent.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEnroll.php (modified) (history)
  • /trunk/extensions/EducationProgram/sql/EducationProgram.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/sql/EducationProgram.sql
@@ -67,7 +67,7 @@
6868 CREATE INDEX /*i*/ep_course_year ON /*_*/ep_courses (course_year);
6969 CREATE INDEX /*i*/ep_course_start ON /*_*/ep_courses (course_start);
7070 CREATE INDEX /*i*/ep_course_end ON /*_*/ep_courses (course_end);
71 -CREATE UNIQUE INDEX /*i*/ep_trem_period ON /*_*/ep_courses (course_org_id, course_start, course_end);
 71+CREATE INDEX /*i*/ep_trem_period ON /*_*/ep_courses (course_org_id, course_start, course_end);
7272 CREATE INDEX /*i*/ep_course_students ON /*_*/ep_courses (course_students);
7373
7474
Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
@@ -58,7 +58,7 @@
5959 if ( count( $args ) === 2 ) {
6060 $token = $args[1];
6161 }
62 - elseif ( $this->getRequest()->wasPosted() && $this->getRequest()->getCheck( 'wptoken' ) ) {
 62+ elseif ( $this->getRequest()->getCheck( 'wptoken' ) ) {
6363 $token = $this->getRequest()->getText( 'wptoken' );
6464 }
6565
@@ -128,7 +128,7 @@
129129 $out->addHTML( Html::openElement(
130130 'form',
131131 array(
132 - 'method' => 'post',
 132+ 'method' => 'get',
133133 'action' => $this->getTitle( $this->subPage )->getLocalURL(),
134134 )
135135 ) );
Index: trunk/extensions/EducationProgram/includes/EPStudent.php
@@ -93,7 +93,7 @@
9494 foreach ( $courses as /* EPCourse */ $course ) {
9595 EPMC::updateSummaryFields( 'students', array( 'id' => $course->getField( 'mc_id' ) ) );
9696 EPOrg::updateSummaryFields( 'students', array( 'id' => $course->getField( 'org_id' ) ) );
97 - EPCourse::updateSummaryFields( 'students', array( 'id' => $this->getId() ) );
 97+ EPCourse::updateSummaryFields( 'students', array( 'id' => $course->getId() ) );
9898 }
9999
100100 return $success;
Index: trunk/extensions/EducationProgram/includes/EPMC.php
@@ -132,7 +132,7 @@
133133 }
134134
135135 if ( $this->updateSummaries && $orgId !== false ) {
136 - EPCourse::updateSummaryFields( array( 'mcs', 'students', 'courses', 'active' ), array( 'id' => $orgId ) );
 136+ EPOrg::updateSummaryFields( array( 'mcs', 'students', 'courses', 'active' ), array( 'id' => $orgId ) );
137137 }
138138
139139 return $success;
Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -235,7 +235,7 @@
236236 $success = parent::removeFromDB();
237237
238238 if ( $success && $this->updateSummaries ) {
239 - EPCourse::updateSummaryFields( 'students', array( 'id' => $courseId ) );
 239+ EPMC::updateSummaryFields( 'students', array( 'id' => $courseId ) );
240240 EPOrg::updateSummaryFields( array( 'terms', 'students', 'active' ), array( 'id' => $orgId ) );
241241 }
242242
@@ -274,7 +274,7 @@
275275
276276 if ( $oldCourseId !== false && $oldCourseId !== $this->getField( 'org_id' ) ) {
277277 $conds = array( 'id' => array( $oldCourseId, $this->getField( 'mc_id' ) ) );
278 - EPCourse::updateSummaryFields( array( 'active', 'students' ), $conds );
 278+ EPMC::updateSummaryFields( array( 'active', 'students' ), $conds );
279279 }
280280 }
281281

Status & tagging log