Index: trunk/wiki2xml/php/xml2odt.php |
— | — | @@ -491,9 +491,14 @@ |
492 | 492 | } else { |
493 | 493 | if ( $content_provider->is_an_article ( $this->link_target ) ) { |
494 | 494 | $link = "SEITEN-INTERNER LINK" ; |
495 | | -/* $lt = $this->internal_id ( trim ( $this->link_target ) ) ; |
496 | | - $lt = str_replace ( "+" , "_" , $lt ) ; |
497 | | - $link = "<link linkend='{$lt}'>{$link}</link>" ;*/ |
| 495 | + # dub sez... working internal links |
| 496 | + $lt = ( trim ( $this->link_target ) ) ; |
| 497 | + $lt = str_replace ( "+" , " " , $lt ) ; |
| 498 | + $text = array_pop ( $this->link_parts ) ; |
| 499 | + if (!$text) |
| 500 | + $text = $lt; |
| 501 | + $link = '<text:a xlink:type="simple" xlink:href="#' . $lt . '|outline">' . $text . '</text:a>' ; |
| 502 | + #$link = "<link linkend='{$lt}'>#{$lt}|outline</link>" ; |
498 | 503 | } else { |
499 | 504 | $href = $xml2odt->get_url ( $this->link_target ) ; |
500 | 505 | if ( count ( $this->link_parts ) == 0 ) $text = $this->link_target ; |
Index: trunk/wiki2xml/php/w2x.php |
— | — | @@ -48,7 +48,8 @@ |
49 | 49 | } |
50 | 50 | $optional = "<br/>" . implode ( "<br/>" , $optional ) ; |
51 | 51 | |
52 | | - if ( $as_extension ) $site = "<input type='hidden' name='site' value=''/>" ; |
| 52 | + # dub sez... working images |
| 53 | + if ( $as_extension ) $site = "<input type='hidden' name='site' value='".$xmlg["site_base_url"]."'/>" ; |
53 | 54 | else $site = "Site : http://<input type='text' name='site' value='".$xmlg["site_base_url"]."'/>/index.php<br/>" ; |
54 | 55 | |
55 | 56 | $additional = array() ; |
Index: trunk/wiki2xml/php/content_provider.php |
— | — | @@ -54,7 +54,14 @@ |
55 | 55 | $target = $dir . "/" . $fname ; |
56 | 56 | if ( !file_exists ( $target ) && !$this->block_file_download ) { |
57 | 57 | @mkdir ( $dir ) ; |
58 | | - @copy ( $url , $target ) ; |
| 58 | + # dub sez... use cURL |
| 59 | + $ch = curl_init(); |
| 60 | + curl_setopt($ch, CURLOPT_URL, $url); |
| 61 | + $fh = @fopen($target, 'w'); |
| 62 | + curl_setopt($ch, CURLOPT_FILE, $fh); |
| 63 | + curl_exec($ch); |
| 64 | + curl_close($ch); |
| 65 | + @fclose($fh); |
59 | 66 | } |
60 | 67 | return $fname ; |
61 | 68 | } |