Bug with fix - serendipity_functions.inc.php

Found a bug? Tell us!!
Post Reply
AlfaTeK
Posts: 2
Joined: Sat Feb 14, 2004 6:17 pm
Contact:

Bug with fix - serendipity_functions.inc.php

Post by AlfaTeK »

When URL Rewriting is disabled the link to the category is wrong:

I mean the link that appears in "Posted by XXX in Category YYY", the link in Category YYY is wrong because it doesn't add the required ?/ (instead it remains http://localhost/categories/1_Reminders, should be http://localhost/index.php?/categories/1_Reminders)

I took a look at the CVS and the bug is still there, i think it's line 777 in the CVS version, here goes the fix:

Code: Select all

Replace:

echo '                ' . POSTED_BY . ' ' . htmlentities($entry['username']) . ($entry['category_name'] ? ' ' . IN . ' <a href="' . $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'true' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $entry['categoryid'] . '_' . serendipity_makeFilename($entry['category_name']) . '">' . $entry['category_name'] . '</a> ' : ' ') . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";

Replace to

echo '                ' . POSTED_BY . ' ' . htmlentities($entry['username']) . ($entry['category_name'] ? ' ' . IN . ' <a href="' . $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $entry['categoryid'] . '_' . serendipity_makeFilename($entry['category_name']) . '">' . $entry['category_name'] . '</a> ' : ' ') . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";
Note the == 'none' instead of == 'true', i believe this is the way it should be [function serendipity_archiveURL for example does this == 'none']


I don't know if this is the right place to post bug fixes, so if it's not, sorry. I also don't know how to use CVS or if it's possible to commit this directly to the CVS, but i guess someone will do it ;)
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

Fixed in CVS, thanks :)
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Post Reply