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 » HTML » Pager » Bug #2617

[PATCH] 'append' Links are broken when used on index pages

Details

Submitted2004-10-25 22:03 UTC
Fromieure at php dot net
Assignedquipo
StatusClosed
PackagePager
PHP Version4.3.9
OSLinux
Roadmaps(Not assigned)

Comments

[2004-10-25 22: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.