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

Bug #2617 [PATCH] 'append' Links are broken when used on index pages
Submitted: 2004-10-25 17:03 UTC Modified: 2004-10-26 04:55 UTC
From: ieure at php dot net Assigned: quipo
Status: Closed Package: Pager
PHP Version: 4.3.9 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-10-25 17:03 UTC] ieure at php dot net
Description: ------------ When a Pager is used on a DirectoryIndex script, the links don't work. Pager seems to assume that the last component of the path is always a filename, when it is a directory in this case. E.g. if you have a Pager on 'index.php', and the URL to that is http://www.example.com/Foo/index.php, the wrong links are returned when accessing it as http://www.example.com/Foo/ Patch is here: http://atomized.org/PEAR/Patches/Pager-Index_Links.patch The patch checks for a path ending in '/', and sets CURRENT_FILENAME to an empty string if this is the case. Reproduce code: --------------- Use a Pager on any script used as a DirectoryIndex. Expected result: ---------------- If a Pager is on the following URL: http://www.example.com/Foo/ The links should be: http://www.example.com/Foo/?pageID=nn or http://www.example.com/Foo/index.php?pageID=nn Actual result: -------------- The links are: http://www.example.com/Foo?pageID=nn Which causes Apache to interpret the request as asking for the nonexistent 'Foo' file, not the index of the 'Foo' directory.

Comments

 [2004-10-26 04:55 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. committed, thanks.