r108659 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108658‎ | r108659 | r108660 >
Date:19:32, 11 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r108646; fixed call to method of wrong class and incorrect casting
Modified paths:
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPOrg.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialCourse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -190,7 +190,7 @@
191191 $options = array();
192192
193193 foreach ( $courses as /* EPCourse */ $course ) {
194 - $options[$course->getField( 'name' )] = (string)$course->getId();
 194+ $options[$course->getField( 'name' )] = $course->getId();
195195 }
196196
197197 return $options;
@@ -279,9 +279,9 @@
280280 $select = new XmlSelect(
281281 'neworg',
282282 'neworg',
283 - array_key_exists( 'org', $args ) ? (string)$args['org'] : false
 283+ array_key_exists( 'org', $args ) ? $args['org'] : false
284284 );
285 -
 285+
286286 $select->addOptions( EPOrg::getOrgOptions( EPOrg::getEditableOrgs( $context->getUser() ) ) );
287287 $out->addHTML( $select->getHTML() );
288288
Index: trunk/extensions/EducationProgram/includes/EPOrg.php
@@ -167,7 +167,7 @@
168168 $options = array();
169169
170170 foreach ( $orgs as /* EPOrg */ $org ) {
171 - $options[$org->getField( 'name' )] = (string)$org->getId();
 171+ $options[$org->getField( 'name' )] = $org->getId();
172172 }
173173
174174 return $options;
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php
@@ -76,7 +76,7 @@
7777 if ( $course->useCanManage( $this->getUser() ) ) {
7878 $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-course-add-term' ) ) );
7979
80 - EPCourse::displayAddNewControl( $this->getContext(), array( 'course' => $course->getId() ) );
 80+ EPTerm::displayAddNewControl( $this->getContext(), array( 'course' => $course->getId() ) );
8181 }
8282 }
8383 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108646add term/course control added to special course/institutionjeroendedauw18:40, 11 January 2012

Status & tagging log