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 #4654

FILENAME overriding User Supplied filename variable (append)

Details

Submitted2005-06-21 17:55 UTC
Fromfaress at gmail dot com
Assignedquipo
StatusClosed
PackagePager
PHP Version5.0.4
OSLAMP
Roadmaps(Not assigned)

Comments

[2005-06-21 17:55 UTC] faress at gmail dot com

Description:
------------
THe problem with this package is when you generate pages, and you don't want to have a CURRENTFILENAME = 'index.php' added to your URL's if your filename is set to ''. You will be stuck not able to use append=false as an override on the filename.
My example shows that i wanted to create a Datagrid using Pager to display results from a Dataset. The problem is that my Url's are all ending with '/' because of a mod_rewrite... it creates the content and Url dynamicly.

Anyway, I am using PHP5.04 with Pager 2.3.2 and DataGrid 0.6.2 on Oracle 9i

In the example below, if I add the parameter 'append' = false, the pager doesn't work and if I dont(means append =true) the 'index.php?page=x' appears on the links.

The problem is that I want to have the page number but without the filename.

I commented the filename override on line 1310 of common.php, and it works fine now.

Don't hesitate to email back if you require more assistance.

Thanks
Fares.

Reproduce code:
---------------
///////////////////////////////////////////////
///code sample :

// Define New DataGrid
if (isset($_GET['page'])) {
$dg = new Structures_DataGrid($c, $_GET['page']);
} else {
$dg = new Structures_DataGrid($c);
}
if(!empty($documents_arr)) $dg->bind($documents_arr);
$dg->renderer->getPaging('Sliding', '|', '<<', '>>', 5, array('path' => get_url(FW_FULL_URL), 'fileName' => '', 'append'=> true));

Expected result:
----------------
Create a sliding page menu at the bottom of the datagrid result. Each link to the following pages will have to look like this :

http://FULLURLWITHOUTPAGEJUSTDIRECTORY/?page=3

Actual result:
--------------
http://FULLURLWITHOUTPAGEJUSTDIRECTORY/index.php?page=3

[2005-06-23 21:23 UTC] faress at gmail dot com

Wow, You're a GENIUS!!!

I am sorry I doubted you.

It works fine now.
Thanks a million!

Fares.