PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Wiki_Tiki » Bug #9152

Tiki Wikilink renderer error

Details

Submitted2006-10-24 16:13 UTC
Fromvarga dot attila dot 75 at freemail dot hu
Assignedjustinpatrin
StatusClosed
PackageText_Wiki_Tiki
PHP Version5.1.6
OSWindows
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.