Index: trunk/extensions/UploadWizard/UploadWizardTutorial.php |
— | — | @@ -36,13 +36,7 @@ |
37 | 37 | $errorHtml = ''; |
38 | 38 | $tutorialHtml = ''; |
39 | 39 | |
40 | | - // get a valid language code, even if the global is wrong |
41 | | - if ( $wgLang ) { |
42 | | - $langCode = $wgLang->getCode(); |
43 | | - } |
44 | | - if ( !isset( $langCode) or $langCode === '' ) { |
45 | | - $langCode = 'en'; |
46 | | - } |
| 40 | + $langCode = $wgLang->getCode(); |
47 | 41 | |
48 | 42 | $tutorialFile = false; |
49 | 43 | // getFile returns false if it can't find the right file |
— | — | @@ -54,7 +48,7 @@ |
55 | 49 | } |
56 | 50 | |
57 | 51 | // at this point, we have one of the following situations: |
58 | | - // $error is empty, and tutorialFile is the right one for this language |
| 52 | + // $error is null, and tutorialFile is the right one for this language |
59 | 53 | // $error notes we couldn't find the tutorialFile for your language, and $tutorialFile is the english one |
60 | 54 | // $error notes we couldn't find the tutorialFile for your language, and $tutorialFile is still false (major file failure) |
61 | 55 | |
— | — | @@ -75,7 +69,7 @@ |
76 | 70 | $error = 'file-missing'; |
77 | 71 | } |
78 | 72 | |
79 | | - if ( isset( $error ) ) { |
| 73 | + if ( $error !== null ) { |
80 | 74 | $errorHtml = Html::element( 'p', array( 'class' => 'errorbox', 'style' => 'float: none;' ), wfMsg( 'mwe-upwiz-tutorial-error-' . $error ) ); |
81 | 75 | } |
82 | 76 | |