Index: trunk/extensions/EducationProgram/specials/SpecialEditCourse.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | 'required' => true, |
102 | 102 | 'options' => $langOptions, |
103 | 103 | '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' ); |
105 | 105 | } |
106 | 106 | ); |
107 | 107 | |
Index: trunk/extensions/EducationProgram/EducationProgram.hooks.php |
— | — | @@ -165,6 +165,10 @@ |
166 | 166 | $textParts = SpecialPageFactory::resolveAlias( $sktemplate->getTitle()->getText() ); |
167 | 167 | $baseText = $textParts[0]; |
168 | 168 | |
| 169 | + if ( is_null( $textParts[1] ) ) { |
| 170 | + return true; |
| 171 | + } |
| 172 | + |
169 | 173 | $specials = array( |
170 | 174 | array( |
171 | 175 | 'view' => 'Institution', |