You are here

function domain_batch_sort in Domain Access 5

Same name and namespace in other branches
  1. 6.2 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 825
Administration functions for the domain module.

Code

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