r110756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110755‎ | r110756 | r110757 >
Date:16:29, 6 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r110754; make sure field is set and only rem second element when present
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.hooks.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -284,6 +284,7 @@
285285 */
286286 protected function saveExisting() {
287287 if ( $this->updateSummaries ) {
 288+ $currentCourse = false;
288289 $currentFields = array( 'id' );
289290
290291 foreach ( array( 'org_id', 'online_ambs', 'campus_ambs' ) as $field ) {
Index: trunk/extensions/EducationProgram/EducationProgram.hooks.php
@@ -197,7 +197,11 @@
198198 // Remove the token from the title if needed.
199199 if ( !$sktemplate->getRequest()->getCheck( 'wptoken' ) ) {
200200 $textParts[1] = explode( '/', $textParts[1] );
201 - array_pop( $textParts[1] );
 201+
 202+ if ( count( $textParts[1] ) > 1 ) {
 203+ array_pop( $textParts[1] );
 204+ }
 205+
202206 $textParts[1] = implode( '/', $textParts[1] );
203207 }
204208

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110754fixed some issues with enrollment and course creationjeroendedauw16:25, 6 February 2012

Status & tagging log