function _scanner_compare_fields_by_name in Search and Replace Scanner 7
Comparison function for sorting fields by table/field name.
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 name.
2 string references to '_scanner_compare_fields_by_name'
- scanner_admin_form in ./
scanner.admin.inc - The main settings form.
- scanner_execute in ./
scanner.module - Handles the actual search and replace.
File
- ./
scanner.module, line 1219 - Search and Replace Scanner - works on all nodes text content.
Code
function _scanner_compare_fields_by_name(array $left, array $right) {
$cmp = strcmp($left['type'], $right['type']);
if ($cmp != 0) {
return $cmp;
}
return strcmp($left['field'], $right['field']);
}