Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -65,6 +65,16 @@ abstract class _Table
|
||||
* @brief Columns that are not sortable
|
||||
*/
|
||||
public $noSort = array();
|
||||
|
||||
/**
|
||||
* @brief Default column to sort results by
|
||||
*/
|
||||
public $defaultSortBy;
|
||||
|
||||
/**
|
||||
* @brief Default sort direction - "asc" or "desc"
|
||||
*/
|
||||
public $defaultSortDirection = NULL;
|
||||
|
||||
/**
|
||||
* @brief Filters
|
||||
@@ -770,6 +780,12 @@ abstract class _Table
|
||||
*/
|
||||
public function getSortDirection( $column )
|
||||
{
|
||||
/* If the column we are sorting by is the default sort, use the default sort direction */
|
||||
if ( $this->defaultSortBy AND $column == $this->defaultSortBy AND $this->defaultSortDirection )
|
||||
{
|
||||
return $this->defaultSortDirection;
|
||||
}
|
||||
|
||||
if( $column == 'title' )
|
||||
{
|
||||
return 'asc';
|
||||
|
||||
Reference in new issue
Block a user