r110107 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110106‎ | r110107 | r110108 >
Date:08:51, 27 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
validation fix and tab display tweak
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.hooks.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEditCourse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php
@@ -100,7 +100,7 @@
101101 'required' => true,
102102 'options' => $langOptions,
103103 'validation-callback' => function ( $value, array $alldata = null ) use ( $langOptions ) {
104 - return array_key_exists( $value, $langOptions ) ? true : wfMsg( 'ep-course-invalid-lang' );
 104+ return in_array( $value, $langOptions ) ? true : wfMsg( 'ep-course-invalid-lang' );
105105 }
106106 );
107107
Index: trunk/extensions/EducationProgram/EducationProgram.hooks.php
@@ -165,6 +165,10 @@
166166 $textParts = SpecialPageFactory::resolveAlias( $sktemplate->getTitle()->getText() );
167167 $baseText = $textParts[0];
168168
 169+ if ( is_null( $textParts[1] ) ) {
 170+ return true;
 171+ }
 172+
169173 $specials = array(
170174 array(
171175 'view' => 'Institution',

Status & tagging log