Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | } |
86 | 86 | |
87 | 87 | class ExtMobileFrontend { |
88 | | - const VERSION = '0.5.71'; |
| 88 | + const VERSION = '0.5.72'; |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * @var DOMDocument |
— | — | @@ -240,9 +240,12 @@ |
241 | 241 | self::$disableImagesURL = $wgRequest->escapeAppendQuery( 'disableImages=1' ); |
242 | 242 | self::$enableImagesURL = $wgRequest->escapeAppendQuery( 'enableImages=1' ); |
243 | 243 | self::$disableMobileSiteURL = $wgRequest->escapeAppendQuery( 'mobileaction=disable_mobile_site' ); |
244 | | - self::$viewNormalSiteURL = str_replace( $wgMobileDomain, '.', $wgRequest->getFullRequestURL() ); |
245 | | - self::$viewNormalSiteURL = $this->removeQueryStringParameter( self::$viewNormalSiteURL, 'useformat' ); |
246 | | - self::$currentURL = $wgRequest->getFullRequestURL(); |
| 244 | + $parsedUrl = parse_url( $wgRequest->getFullRequestURL() ); |
| 245 | + $parsedUrl['host'] = str_replace( $wgMobileDomain, '.', $parsedUrl['host'] ); |
| 246 | + $parsedUrl['query'] = $this->removeQueryStringParameter( $parsedUrl['query'], 'useformat' ); |
| 247 | + $fragmentDelimiter = ( !empty( $parsedUrl['fragment'] ) ) ? '#' : ''; |
| 248 | + self::$viewNormalSiteURL = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . '?' . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment']; |
| 249 | + self::$currentURL = $wgRequest->getFullRequestURL(); |
247 | 250 | self::$leaveFeedbackURL = $wgRequest->escapeAppendQuery( 'mobileaction=leave_feedback' ); |
248 | 251 | |
249 | 252 | $skin = $wgUser->getSkin(); |