You are here

function domain_batch_sort in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_admin.inc \domain_batch_sort()
  2. 7.3 domain.admin.inc \domain_batch_sort()
  3. 7.2 domain.admin.inc \domain_batch_sort()

Sorting function for domain batch options.

1 string reference to 'domain_batch_sort'
domain_batch_list in ./domain.admin.inc
Lists available batch updates for the domain module.

File

./domain.admin.inc, line 756
Administration functions for the domain module.

Code

function domain_batch_sort($a, $b) {
  if ($a['#module'] != $b['#module']) {
    return strcmp($a['#module'], $b['#module']);
  }
  if ($a['#weight'] == $b['#weight']) {
    return strcmp($a['#form']['#title'], $b['#form']['#title']);
  }
  else {
    return $a['#weight'] < $b['#weight'] ? -1 : 1;
  }
}