Add comments sorting
This commit is contained in:
@@ -154,4 +154,26 @@ class UserSession extends Base
|
||||
{
|
||||
$_SESSION['board_collapsed'][$project_id] = $collapsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set comments sorting
|
||||
*
|
||||
* @access public
|
||||
* @param string $order
|
||||
*/
|
||||
public function setCommentSorting($order)
|
||||
{
|
||||
$this->session['comment_sorting'] = $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get comments sorting direction
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCommentSorting()
|
||||
{
|
||||
return $this->session['comment_sorting'] ?: 'ASC';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user