Home » Text » Text_Wiki_Tiki » Bug #9152
Tiki Wikilink renderer error
Details
| Submitted | 2006-10-24 16:13 UTC |
|---|---|
| From | varga dot attila dot 75 at freemail dot hu |
| Assigned | justinpatrin |
| Status | Closed |
| Package | Text_Wiki_Tiki |
| PHP Version | 5.1.6 |
| OS | Windows |
| Roadmaps | (Not assigned) |
Comments
[2006-10-24 16:13 UTC] varga dot attila dot 75 at freemail dot hu
Description:
------------
I tried to transform Mediawiki pages to TikiWiki. In the class Text_Wiki_Render_Tiki_Wikilink the token function starts like this:
if ($options['type'] == 'start') {
but the $options array has only the following keys:
- 'page'
- 'anchor'
- 'text'
So I got the next message:
PHP Notice: Undefined index: type in c:\php\PEAR\Text\Wiki\Render\Tiki\Wikilink.php on line 20
and the wikilinks in the pages were missing.
Test script:
---------------
I solved the problem by changing the function to this:
function token($options)
{
return '(('.$options['page'].
(strlen($options['anchor']) ? '#'.$options['anchor'] : '').
(strlen($options['text']) && $options['page'] != $options['text'] ? '|'.$options['text'] : '').
'))';
}
Some expert should solve the problem the right way, and create a new version.