dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2543ca
)
* (bug 563) Fix UTF-8 interwiki URL redirects via Latin-1 wikis
author
Brion Vibber
<brion@users.mediawiki.org>
Sun, 27 Feb 2005 09:58:49 +0000
(09:58 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sun, 27 Feb 2005 09:58:49 +0000
(09:58 +0000)
index.php
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index
0df5541
..
cbb5137
100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-69,6
+69,12
@@
if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) {
$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
$wgOut->errorpage( 'badtitle', 'badtitletext' );
} else if ( $wgTitle->getInterwiki() != '' ) {
$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
$wgOut->errorpage( 'badtitle', 'badtitletext' );
} else if ( $wgTitle->getInterwiki() != '' ) {
+ if( $wgUseLatin1 ) {
+ # Conversion from UTF-8 may truncate or corrupt non-Latin links.
+ # Grab a fresh copy without doing the automated conversion checks.
+ $interwiki = Title::newFromUrl( $_REQUEST['title'] );
+ if( !is_null( $interwiki ) ) $wgTitle = $interwiki;
+ }
$url = $wgTitle->getFullURL();
# Check for a redirect loop
if ( !preg_match( '/^' . preg_quote( $wgServer, '/' ) . '/', $url ) && $wgTitle->isLocal() ) {
$url = $wgTitle->getFullURL();
# Check for a redirect loop
if ( !preg_match( '/^' . preg_quote( $wgServer, '/' ) . '/', $url ) && $wgTitle->isLocal() ) {