r56073 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56072‎ | r56073 | r56074 >
Date:21:24, 8 September 2009
Author:magnusmanske
Status:deferred
Tags:
Comment:
activated no_interlanguage and no_categories options
Modified paths:
  • /trunk/wiki2xml/php/xml2txt.php (modified) (history)

Diff [purge]

Index: trunk/wiki2xml/php/xml2txt.php
@@ -34,8 +34,9 @@
3535 } elseif ($child->name != 'ATTRS') {
3636 $sub = $child->parse ( $tree ) ;
3737 if ( $this->name == 'LINK' ) {
38 - if ( $child->name == 'TARGET' ) $this->link_target = $sub ;
39 - else if ( $child->name == 'PART' ) $this->link_parts[] = $sub ;
 38+ if ( $child->name == 'TARGET' ) {
 39+ $this->link_target = $sub ;
 40+ } else if ( $child->name == 'PART' ) $this->link_parts[] = $sub ;
4041 else if ( $child->name == 'TRAIL' ) $this->link_trail = $sub ;
4142 }
4243 $ret .= $sub ;
@@ -91,8 +92,10 @@
9293 $link = "\m(" . $nstext . ":" . $link . ")\n" ;
9394 }
9495 } else if ( $ns == -9 ) { # Adding newline to interlanguage link
 96+ if ( !$xmlg['keep_interlanguage'] ) return '' ;
9597 $link = "\m" . $link ;
9698 } else if ( $ns == -8 ) { # Adding newline to category link
 99+ if ( !$xmlg['keep_categories'] ) return '' ;
97100 if ( $link_text == "!" || $link_text == '*' ) $link = "" ;
98101 else $link = " ({$link})" ;
99102 $link = "\m" . $this->link_target . $link . "\n" ;

Status & tagging log