Index: trunk/wiki2xml/php/xml2txt.php |
— | — | @@ -34,8 +34,9 @@ |
35 | 35 | } elseif ($child->name != 'ATTRS') { |
36 | 36 | $sub = $child->parse ( $tree ) ; |
37 | 37 | 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 ; |
40 | 41 | else if ( $child->name == 'TRAIL' ) $this->link_trail = $sub ; |
41 | 42 | } |
42 | 43 | $ret .= $sub ; |
— | — | @@ -91,8 +92,10 @@ |
92 | 93 | $link = "\m(" . $nstext . ":" . $link . ")\n" ; |
93 | 94 | } |
94 | 95 | } else if ( $ns == -9 ) { # Adding newline to interlanguage link |
| 96 | + if ( !$xmlg['keep_interlanguage'] ) return '' ; |
95 | 97 | $link = "\m" . $link ; |
96 | 98 | } else if ( $ns == -8 ) { # Adding newline to category link |
| 99 | + if ( !$xmlg['keep_categories'] ) return '' ; |
97 | 100 | if ( $link_text == "!" || $link_text == '*' ) $link = "" ; |
98 | 101 | else $link = " ({$link})" ; |
99 | 102 | $link = "\m" . $this->link_target . $link . "\n" ; |