Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

+24
View File
@@ -253,6 +253,10 @@ class _Content extends Table
}
}
/* Make sure we initialize the default sort fields so that we can properly get the column sort direction */
$this->defaultSortBy = $this->sortBy;
$this->defaultSortDirection = $this->sortDirection;
/* Do any multi-mod */
if ( isset( \IPS\Request::i()->modaction ) )
{
@@ -1061,4 +1065,24 @@ class _Content extends Table
{
return $this->container;
}
/**
* Return the sort direction to use for links
*
* @note Abstracted so other table helper instances can adjust as needed
* @param string $column Sort by string
* @return string [asc|desc]
*/
public function getSortDirection( $column )
{
$class = $this->class;
/* ID and Title columns should be ascending */
if( $column != $this->defaultSortBy AND ( $column == $class::$databaseColumnId OR $column == $class::$databaseColumnMap[ 'title' ] ) )
{
return 'asc';
}
return parent::getSortDirection( $column );
}
}