r56074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56073‎ | r56074 | r56075 >
Date:21:36, 8 September 2009
Author:magnusmanske
Status:deferred
Tags:
Comment:
better reference handling
Modified paths:
  • /trunk/wiki2xml/php/xml2txt.php (modified) (history)

Diff [purge]

Index: trunk/wiki2xml/php/xml2txt.php
@@ -68,7 +68,11 @@
6969 return "" ;
7070 }
7171
72 - if ( $tag == "LINK" ) {
 72+ if ( $tag == "EXTENSION" ) {
 73+ $sub = trim ( $this->sub_parse ( $tree ) ) ;
 74+ if ( $sub == '' ) return '' ;
 75+ return " [$sub] " ;
 76+ } else if ( $tag == "LINK" ) {
7377 $sub = $this->sub_parse ( $tree ) ;
7478 $link = "" ;
7579 if ( isset ( $this->attrs['TYPE'] ) AND strtolower ( $this->attrs['TYPE'] ) == 'external' ) {
@@ -131,6 +135,7 @@
132136 else array_push ( $tree->list , $x + 1 ) ; # Increase last counter
133137 }
134138 } else {
 139+
135140 if ( $tag == "ARTICLE" && isset ( $this->attrs["TITLE"] ) ) {
136141 $ret .= strtoupper ( urldecode ( $this->attrs["TITLE"] ) ) . "\n" ;
137142 }

Status & tagging log