Page MenuHomePhabricator
Authored By
bzimport
Nov 21 2014, 8:57 PM
Size
1 KB
Referenced Files
None
Subscribers
None
--- cvsD 2006-01-13 20:45:56.000000000 +0100
+++ DoubleWiki.php 2006-01-13 21:21:20.000000000 +0100
@@ -28,23 +28,30 @@
global $wgContLang, $wgRequest, $wgLang, $wgContLanguageCode, $wgTitle;
+ wfDebug( "DoubleWiki::medhod called\n" );
$match_request = $wgRequest->getText( 'match' );
- if ( $match_request === '' ) {
- return ;
- }
+
+ if ( $match_request === '' ) { return true; }
+ wfDebug( "DoubleWiki::request for side-by-side display\n" );
+
+ if ( $wgTitle->mNamespace != 0 ) { return true; }
+ wfDebug( "DoubleWiki::namespace is 0\n" );
foreach( $parserOutput->mLanguageLinks as $l ) {
$nt = Title::newFromText( $l );
$iw = $nt->getInterwiki();
if( $iw === $match_request ){
+ wfDebug( "DoubleWiki::found interlanguage link\n" );
$url = $nt->getFullURL();
$myURL = $wgTitle -> getLocalURL() ;
$languageName = $wgContLang->getLanguageName( $nt->getInterwiki() );
$myLanguage = $wgLang->getLanguageName( $wgContLanguageCode );
$sep = ( in_string( '?', $url ) ) ? '&' : '?';
+ wfDebug( "DoubleWiki::wfGetHttp ".$url.$sep.'action=render'."\n" );
$translation = wfGetHttp( $url.$sep.'action=render' );
if ( $translation !== null ) {
+ wfDebug( "DoubleWiki:: wfGetHttp successful\n" );
#first find all links that have no 'class' parameter.
#these links are local so we add '?match=xx' to their url,
#unless it already contains a '?'
@@ -87,6 +94,7 @@
return true;
}
}
+ wfDebug( "DoubleWiki::did not find interlanguage link\n" );
return true;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2051
Default Alt Text
patch (1 KB)

Event Timeline