Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.0

Bug #16322 Tiki Url renderer error
Submitted: 2009-06-13 03:50 UTC
From: rodrigosprimo Assigned: rodrigosprimo
Status: Closed Package: Text_Wiki_Tiki (version CVS)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-13 03:50 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
Description: ------------ The file Text/Wiki/Render/Tiki/Url.php checks for $options['page'] which is a undefined index so there is a error when rendering URLs. Instead it should check for the $options['href'] Test script: --------------- Try to render using Tiki syntax the following code: [http://exemple.com] Expected result: ---------------- [http://exemple.com] Actual result: -------------- [http://exemple.com|http://exemple.com]

Comments

 [2009-06-13 03:52 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
Apparently there is a temporary problem with PEAR and I can't send the patch as a attachment so I'm copying below the patch code: Index: Text/Wiki/Parse/Tiki/Url.php =================================================================== RCS file: /repository/pear/Text_Wiki/Text/Wiki/Parse/Tiki/Url.php,v retrieving revision 1.1 diff -u -r1.1 Url.php --- Text/Wiki/Parse/Tiki/Url.php 21 Jul 2005 20:56:14 -0000 1.1 +++ Text/Wiki/Parse/Tiki/Url.php 8 Jun 2009 17:54:04 -0000 @@ -28,7 +28,7 @@ * * inline -- http://example.com * numbered -- [http://example.com] -* described -- [http://example.com Example Description] +* described -- [http://example.com|Example Description] * * When rendering a URL token, this will convert URLs pointing to a .gif, * .jpg, or .png image into an inline <img /> tag (for the 'xhtml' Index: Text/Wiki/Render/Tiki/Url.php =================================================================== RCS file: /repository/pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php,v retrieving revision 1.2 diff -u -r1.2 Url.php --- Text/Wiki/Render/Tiki/Url.php 24 Oct 2006 14:53:32 -0000 1.2 +++ Text/Wiki/Render/Tiki/Url.php 8 Jun 2009 17:54:12 -0000 @@ -19,7 +19,7 @@ function token($options) { if ($options['type'] == 'start') { - if (! strlen($options['text']) || $options['page'] == $options['text']) { + if (! strlen($options['text']) || $options['href'] == $options['text']) { return '['.$options['href']; } else { return '['.$options['href'].'|'; @@ -29,7 +29,7 @@ return ']'; } else { - if (! strlen($options['text']) || $options['page'] == $options['text']) { + if (! strlen($options['text']) || $options['href'] == $options['text']) { return '['.$options['href'].']'; } else { return '['.$options['href'].'|'.$options['text'].']';
 [2009-06-14 08:30 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
-Status: Open +Status: Closed -Assigned To: +Assigned To: rodrigosprimo
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.