Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php |
— | — | @@ -53,13 +53,15 @@ |
54 | 54 | $this->outputHeader(); |
55 | 55 | |
56 | 56 | // if query string includes 'skiptutorial=true' set config variable to true |
57 | | - if ( $wgRequest->getCheck( 'skiptutorial' ) ) { |
58 | | - $skip = in_array( $wgRequest->getText( 'skiptutorial' ), array( '1', 'true' ) ); |
| 57 | + $skipTutorial = $wgRequest->getCheck( 'skiptutorial' ); |
| 58 | + if ( $skipTutorial ) { |
| 59 | + $skip = in_array( $skipTutorial, array( '1', 'true' ) ); |
59 | 60 | UploadWizardConfig::setUrlSetting( 'skipTutorial', $skip ); |
60 | 61 | } |
61 | 62 | |
62 | | - if ( $wgRequest->getCheck( 'categories' ) ) { |
63 | | - UploadWizardConfig::setUrlSetting( 'defaultCategories', explode( '|', $wgRequest->getText( 'categories' ) ) ); |
| 63 | + $categories = $wgRequest->getText( 'categories' ); |
| 64 | + if ( $categories ) { |
| 65 | + UploadWizardConfig::setUrlSetting( 'defaultCategories', explode( '|', $categories ) ); |
64 | 66 | } |
65 | 67 | |
66 | 68 | $ulrArgs = array( |
— | — | @@ -71,8 +73,9 @@ |
72 | 74 | ); |
73 | 75 | |
74 | 76 | foreach ( $ulrArgs as $arg => $setting ) { |
75 | | - if ( $wgRequest->getCheck( $arg ) ) { |
76 | | - UploadWizardConfig::setUrlSetting( $setting, $wgRequest->getText( $arg ) ); |
| 77 | + $value = $wgRequest->getText( $arg ); |
| 78 | + if ( $value ) { |
| 79 | + UploadWizardConfig::setUrlSetting( $setting, $value ); |
77 | 80 | } |
78 | 81 | } |
79 | 82 | |