Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2475
patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:57 PM
2014-11-21 20:57:52 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch
View Options
--- 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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2051
Default Alt Text
patch (1 KB)
Attached To
Mode
T6104: render a text and its translation, on two columns
Attached
Detach File
Event Timeline
Log In to Comment