Home » HTML » Pager » Bug #4654
FILENAME overriding User Supplied filename variable (append)
Details
| Submitted | 2005-06-21 17:55 UTC |
|---|---|
| From | faress at gmail dot com |
| Assigned | quipo |
| Status | Closed |
| Package | Pager |
| PHP Version | 5.0.4 |
| OS | LAMP |
| 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.