Index: branches/resourceloader/phase3/includes/ResourceLoader.php |
— | — | @@ -189,11 +189,15 @@ |
190 | 190 | global $wgUser, $wgLang, $wgDefaultSkin; |
191 | 191 | // Fallback on system settings |
192 | 192 | $parameters = array( |
193 | | - 'user' => $request->getBool( 'user', $wgUser->isLoggedIn() ), |
| 193 | + 'user' => $request->getVal( 'user', $wgUser->isLoggedIn() ), |
194 | 194 | 'lang' => $request->getVal( 'lang', $wgLang->getCode() ), |
195 | 195 | 'skin' => $request->getVal( 'skin', $wgDefaultSkin ), |
196 | | - 'debug' => $request->getBool( 'debug' ), |
| 196 | + 'debug' => $request->getVal( 'debug' ), |
197 | 197 | ); |
| 198 | + // Mediawiki's WebRequest::getBool is a bit on the annoying side - we need to allow 'true' and 'false' values |
| 199 | + // to be converted to boolean true and false |
| 200 | + $parameters['user'] = $parameters['user'] === 'true' || $parameters['user'] === true ? true : false; |
| 201 | + $parameters['debug'] = $parameters['debug'] === 'true' || $parameters['debug'] === true ? true : false; |
198 | 202 | // Get the direction from the requested language |
199 | 203 | if ( !isset( $parameters['dir'] ) ) { |
200 | 204 | $lang = $wgLang->factory( $parameters['lang'] ); |