diff -u b/conflict.module b/conflict.module --- b/conflict.module +++ b/conflict.module @@ -26,7 +26,7 @@ $form_state['cache'] = TRUE; } - // Highlight conflict or expired fields + // Highlight conflict or expired fields. if (!empty($form_state['temporary']['conflict_fields'])) { foreach ($form_state['temporary']['conflict_fields'] as $field_name) { _conflict_apply_error($form[$field_name]); @@ -77,7 +77,7 @@ $nodes['theirs'] = clone(node_load($node->nid, NULL, TRUE)); // Mine: The node that was about to be saved. $nodes['mine'] = clone($node); - // Store fields names to highlight them after form rebuild + // Store fields names to highlight them after form rebuild. $error_fields = array(); // Dig through the fields looking for conflicts. @@ -154,18 +154,18 @@ - * Iterate all elements children recursively and set error class + * Iterate all elements children recursively and set error class. * - * @param $elements + * @param array $elements */ function _conflict_apply_error(&$elements) { - // Recursive through all children. + // Iterate through all children. foreach (element_children($elements) as $key) { if (isset($elements[$key]) && $elements[$key]) { _conflict_apply_error($elements[$key]); } } // If there are properties, it's probably safe to set #attributes here. - // Ignore container elements, because 'error' class adds weird style there + // Ignore container elements, because 'error' class adds a weird style there. $element_properties = element_properties($elements); if (!empty($element_properties) && (isset($elements['#type']) && $elements['#type'] != 'container')) { $elements['#attributes']['class'][] = 'error'; } -} \ No newline at end of file +}