serendipity_rewriteURL bug
Posted: Fri May 26, 2006 6:23 pm
Using version 0.9 but I didnt see any change in 1.0 in this regard.
From functions.entries.inc.php:
if ($serendipity['GET']['page'] > 1) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] - 1);
$serendipity['smarty']->assign('footer_prev_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
}
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P%s';
$serendipity['smarty']->assign('footer_totalEntries', $totalEntries);
$serendipity['smarty']->assign('footer_totalPages', $totalPages);
$serendipity['smarty']->assign('footer_currentPage', $serendipity['GET']['page']);
$serendipity['smarty']->assign('footer_pageLink', serendipity_rewriteURL(implode('/', $uriArguments) . '.html'));
$serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, (int)$serendipity['GET']['page'], $totalPages, $totalEntries));
if ($serendipity['GET']['page'] < $totalPages) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] + 1);
$serendipity['smarty']->assign('footer_next_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
The following bug/feature happens at:
http://www.tiouw.com/serendipity/
If you look at the next page link it links to: http://www.tiouw.com/serendipity/index. ... es/P2.html
Now if I rename the index.php to nieuws.php as you can see at:
http://www.tiouw.com/serendipity/nieuws.php
the same link has now changed to: http://www.tiouw.com/serendipity/index. ... ws/P2.html
which of course doesnt work.
I understand that its my own fault of changing the name of index.php. But it still seems strange how the functions returns a different URL based on the filename. If you can point me to where I need to look to change this I would be most gratefull.
From functions.entries.inc.php:
if ($serendipity['GET']['page'] > 1) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] - 1);
$serendipity['smarty']->assign('footer_prev_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
}
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P%s';
$serendipity['smarty']->assign('footer_totalEntries', $totalEntries);
$serendipity['smarty']->assign('footer_totalPages', $totalPages);
$serendipity['smarty']->assign('footer_currentPage', $serendipity['GET']['page']);
$serendipity['smarty']->assign('footer_pageLink', serendipity_rewriteURL(implode('/', $uriArguments) . '.html'));
$serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, (int)$serendipity['GET']['page'], $totalPages, $totalEntries));
if ($serendipity['GET']['page'] < $totalPages) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] + 1);
$serendipity['smarty']->assign('footer_next_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
The following bug/feature happens at:
http://www.tiouw.com/serendipity/
If you look at the next page link it links to: http://www.tiouw.com/serendipity/index. ... es/P2.html
Now if I rename the index.php to nieuws.php as you can see at:
http://www.tiouw.com/serendipity/nieuws.php
the same link has now changed to: http://www.tiouw.com/serendipity/index. ... ws/P2.html
which of course doesnt work.
I understand that its my own fault of changing the name of index.php. But it still seems strange how the functions returns a different URL based on the filename. If you can point me to where I need to look to change this I would be most gratefull.