diff options
author | andi <andi@splitbrain.org> | 2005-04-15 22:47:35 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-15 22:47:35 +0200 |
commit | b625487d2258a6f1f875813206adc9a5857dab24 (patch) | |
tree | d58871efbfeb198ad4634add0e496b5cb890b655 /inc/parser/handler.php | |
parent | 4826ab45befb9eb1c664b5d8c8a0f03a7b750b8b (diff) | |
download | rpg-b625487d2258a6f1f875813206adc9a5857dab24.tar.gz rpg-b625487d2258a6f1f875813206adc9a5857dab24.tar.bz2 |
new parser: more hacking, RSS readded
darcs-hash:20050415204735-9977f-613d9b007452d538dcb8fce4ade5cbec389c4415.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r-- | inc/parser/handler.php | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 108a522a5..f36a4f151 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -357,12 +357,7 @@ class Doku_Handler { // If the title is an image, convert it to an array containing the image details } else if ( preg_match('/^\{\{[^\}]+\}\}$/',$link[1]) ) { - $media = Doku_Handler_Parse_Media($link[1]); - - // Check it's really an image, not a link to a file - if ( !strpos($media['type'], 'link') ) { - $link[1] = $media; - } + $link[1] = Doku_Handler_Parse_Media($link[1]); } //decide which kind of link it is @@ -421,18 +416,18 @@ class Doku_Handler { function media($match, $state, $pos) { $p = Doku_Handler_Parse_Media($match); - // If it's not an image, build a normal link - if ( strpos($p['type'], 'link') ) { - $this->__addCall($p['type'],array($p['src'], $p['title']), $pos); - } else { - $this->__addCall( - $p['type'], - array($p['src'], $p['title'], $p['align'], $p['width'], $p['height'], $p['cache']), - $pos - ); - } + $this->__addCall( + $p['type'], + array($p['src'], $p['title'], $p['align'], $p['width'], $p['height'], $p['cache']), + $pos + ); return TRUE; } + + function rss($match, $state, $pos) { + $link = preg_replace(array('/^\{\{rss>/','/\}\}$/'),'',$match); + $this->__addCall('rss',array($link),$pos); + } function externallink($match, $state, $pos) { // Prevent use of multibyte strings in URLs |