You are here

function _scanner_compare_fields_by_label in Search and Replace Scanner 7

Comparison function for sorting fields by table/field label.

Parameters

array $left: One field.

array $right: The other field.

Return value

number Comparison value determining which order these two fields should be sorted in relation to each other based on field label.

File

./scanner.module, line 1198
Search and Replace Scanner - works on all nodes text content.

Code

function _scanner_compare_fields_by_label(array $left, array $right) {
  $cmp = strcmp($left['type'], $right['type']);
  if ($cmp != 0) {
    return $cmp;
  }
  return strcmp($left['field_label'], $right['field_label']);
}