Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | * @param $story |
187 | 187 | */ |
188 | 188 | private function showStoryForm( $story ) { |
189 | | - global $wgOut, $wgLang, $wgRequest, $wgUser, $wgJsMimeType, $wgScriptPath; |
| 189 | + global $wgOut, $wgLang, $wgRequest, $wgUser, $wgJsMimeType, $wgScriptPath, $wgContLanguageCode; |
190 | 190 | global $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen; |
191 | 191 | |
192 | 192 | $wgOut->setPageTitle( $story->story_title ); |
— | — | @@ -225,9 +225,12 @@ |
226 | 226 | '</td></tr>'; |
227 | 227 | |
228 | 228 | $languages = Language::getLanguageNames( false ); |
| 229 | + |
| 230 | + $currentLang = array_key_exists( $story->story_lang_code, $languages ) ? $story->story_lang_code : $wgContLanguageCode; |
| 231 | + |
| 232 | + $options = array(); |
229 | 233 | ksort( $languages ); |
230 | | - |
231 | | - $options = array(); |
| 234 | + |
232 | 235 | foreach ( $languages as $code => $name ) { |
233 | 236 | $display = wfBCP47( $code ) . ' - ' . $name; |
234 | 237 | $options[$display] = $code; |
— | — | @@ -241,7 +244,7 @@ |
242 | 245 | $formBody .= '<tr>' . |
243 | 246 | Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-language' ) ) . |
244 | 247 | '<td>' . |
245 | | - $languageSelector->getInputHTML( $story->story_lang_code ) . |
| 248 | + $languageSelector->getInputHTML( $currentLang ) . |
246 | 249 | '</td></tr>'; |
247 | 250 | |
248 | 251 | $formBody .= '<tr>' . |