--- 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; }