You are here

function _views_weight_sort in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 views_ui/admin.inc \_views_weight_sort()
  2. 6.3 includes/admin.inc \_views_weight_sort()
  3. 7.3 includes/admin.inc \_views_weight_sort()
1 string reference to '_views_weight_sort'
views_fetch_base_tables in includes/admin.inc
Fetch a list of all base tables available

File

includes/admin.inc, line 2995
admin.inc Provides the Views' administrative interface.

Code

function _views_weight_sort($a, $b) {
  if ($a['weight'] != $b['weight']) {
    return $a['weight'] < $b['weight'] ? -1 : 1;
  }
  if ($a['title'] != $b['title']) {
    return $a['title'] < $b['title'] ? -1 : 1;
  }
  return 0;
}