1
npetreley
Comment order code fix
  • 2003/12/17 22:56

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


In the comment_view.php file, the code correctly figures out what order to use to display the comments (newest first or oldest first) and puts the value in $com_order. But then it ignores the value of $com_order in favor of whatever may be in the URL, which is initially nothing, so it ALWAYS defaults to oldest first. Replace this line:

$com_dborder = ($HTTP_GET_VARS['com_order'] != XOOPS_COMMENT_OLD1ST) ? 'DESC' : 'ASC';

with this one to fix the problem...

$com_dborder = ($com_order != XOOPS_COMMENT_OLD1ST) ? 'DESC' : 'ASC';