Page 1 of 1

Bookmarks Module 2.0.1 Parameters not working

Posted: Sat Nov 24, 2007 6:53 pm
by mnapiork
I've installed the Bookmarks module 2.0.1 and I'm trying to 'order_by_date' and it doesn't seem to be working.  If I set it to true or false the order is the same.  I want the bookmarks to be ordered by the newest first.  Does anyone have a solution to fixing this bug?

Thanks in advance!

???

Re: Bookmarks Module 2.0.1 Parameters not working

Posted: Sat Nov 24, 2007 7:15 pm
by mnapiork
I found a solution:

In Bookmarks.module.php you'll notice that after the bookmark_modified_date there is no ASC or DESC to order the results.  If you add DESC after the order by '$bookmarks_table_name.bookmark_modified_date' it will order your bookmarks by the newest first.

Original Code:

Code: Select all

if($order_by_date)
{
	$sql .= "ORDER BY $bookmarks_table_name.bookmark_modified_date";
}
else
{
	$sql .= "ORDER BY $categories_table_name.category_order
		    ,$categories_table_name.category_name
		    ,$bookmarks_table_name.bookmark_title ";
}
Modified Code:

Code: Select all

if($order_by_date)
{
	$sql .= "ORDER BY $bookmarks_table_name.bookmark_modified_date DESC";
}
else
{
	$sql .= "ORDER BY $categories_table_name.category_order
		    ,$categories_table_name.category_name
		    ,$bookmarks_table_name.bookmark_title ";
}