function _views_weight_sort

3.x admin.inc _views_weight_sort($a, $b)
2.x admin.inc _views_weight_sort($a, $b)
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 2998
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;
}