Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -364,10 +364,12 @@ |
365 | 365 | } |
366 | 366 | $fragmentDelimiter = ( isset( $parsedUrl['fragment'] ) && $parsedUrl['fragment'] !== null ) ? '#' : ''; |
367 | 367 | $queryDelimiter = ( isset( $parsedUrl['query'] ) && $parsedUrl['query'] !== null ) ? '?' : ''; |
368 | | - $languageUrl = $parsedUrl['scheme'] . $parsedUrl['delimiter'] . $parsedUrl['host'] |
369 | | - . $parsedUrl['path'] . $queryDelimiter . $parsedUrl['query'] |
370 | | - . $fragmentDelimiter . $parsedUrl['fragment']; |
371 | 368 | |
| 369 | + $languageUrl = $parsedUrl['scheme'] . $parsedUrl['delimiter'] . $parsedUrl['host'] . $parsedUrl['path']; |
| 370 | + if ( isset( $parsedUrl['query'] ) ) { |
| 371 | + $languageUrl .= $queryDelimiter . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment']; |
| 372 | + } |
| 373 | + |
372 | 374 | $languageUrls[] = array( |
373 | 375 | 'href' => $languageUrl, |
374 | 376 | 'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' |