function _views_maintenance_views_sort in Views Maintenance 6
Same name and namespace in other branches
- 7 theme/theme.inc \_views_maintenance_views_sort()
Sorts views according to fields returned by tablesort.
Parameters
array $views: List of views objects.
1 call to _views_maintenance_views_sort()
- template_preprocess_views_maintenance_views_table in theme/
theme.inc - Prepares views info for output and includes required CSS/JS.
File
- theme/
theme.inc, line 87 - Preprocessing and theming functions for Views Maintenance.
Code
function _views_maintenance_views_sort(&$views, $header) {
$ts = tablesort_init($header);
_views_maintenance_views_sort_criteria($ts['sql']);
uasort($views, '_views_maintenance_views_sort_callback');
if ($ts['sort'] == 'desc') {
$views = array_reverse($views, TRUE);
}
}