Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -62,7 +62,7 @@ class _Table extends \IPS\Helpers\Table\Content
|
||||
{
|
||||
if ( !$this->sortBy and $container->_sortBy )
|
||||
{
|
||||
$this->sortBy = '`' . \IPS\gallery\Album::$databaseTable . '`.`' . \IPS\gallery\Album::$databasePrefix . $container->_sortBy . '`';
|
||||
$this->sortBy = \IPS\gallery\Album::$databasePrefix . $container->_sortBy;
|
||||
$this->sortDirection = $container->_sortOrder;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class _Table extends \IPS\Helpers\Table\Content
|
||||
$this->filter = $container->_filter;
|
||||
}
|
||||
|
||||
if ( $this->sortBy === 'name' )
|
||||
if ( $this->sortBy === 'album_name' )
|
||||
{
|
||||
$this->sortDirection = 'asc';
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class _Table extends \IPS\Helpers\Table\Content
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->sortOptions[ 'album_' . $k ] = $k;
|
||||
$this->sortOptions[ 'album_' . $k ] = 'album_' . $k;
|
||||
}
|
||||
|
||||
unset( $this->sortOptions['date'] );
|
||||
@@ -151,4 +151,21 @@ class _Table extends \IPS\Helpers\Table\Content
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 )
|
||||
{
|
||||
if( $column == 'album_name' )
|
||||
{
|
||||
return 'asc';
|
||||
}
|
||||
|
||||
return 'desc';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user