Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -212,8 +212,12 @@ |
213 | 213 | ( !isset($this->GET['variant']) && $wgContLang->hasVariants() && !$wgUser->isLoggedIn() ) ) && |
214 | 214 | !count( array_diff( array_keys( $this->GET ), array( 'action', 'title' ) ) ) ) |
215 | 215 | { |
216 | | - $pref = $wgContLang->getPreferredVariant( $fromUser = false, $fromHeader = true ); |
217 | | - $targetUrl = $title->getFullURL( $variant = $pref ); |
| 216 | + if( !$wgUser->isLoggedIn() ) { |
| 217 | + $pref = $wgContLang->getPreferredVariant( false, $fromHeader = true ); |
| 218 | + $targetUrl = $title->getFullURL( '', $variant = $pref ); |
| 219 | + } |
| 220 | + else |
| 221 | + $targetUrl = $title->getFullURL(); |
218 | 222 | // Redirect to canonical url, make it a 301 to allow caching |
219 | 223 | if( $targetUrl == $request->getFullRequestURL() ) { |
220 | 224 | $message = "Redirect loop detected!\n\n" . |