Index: coherent_access.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/coherent_access/coherent_access.module,v retrieving revision 1.2.2.7 diff -u -r1.2.2.7 coherent_access.module --- coherent_access.module 8 Apr 2010 09:56:11 -0000 1.2.2.7 +++ coherent_access.module 24 Aug 2010 04:24:56 -0000 @@ -9,6 +9,7 @@ define('COHERENT_ACCESS_VIEW', 1); define('COHERENT_ACCESS_EDIT', 2); define('COHERENT_ACCESS_DELETE', 4); +define('COHERENT_ACCESS_TYPE_FIELDS_WEIGHT', 30); /** * See if the node should be governed by coherent_access @@ -236,6 +237,7 @@ '#tree' => TRUE, '#title' => t('Shared Editing'), '#description' => t('Choose users who can edit and view this content. The content author is always an editor and the only one who can delete.'), + '#weight' => (function_exists('content_extra_field_weight') && isset($form['type'])) ? content_extra_field_weight($form['type']['#value'], 'coherent_access') : COHERENT_ACCESS_TYPE_FIELDS_WEIGHT, ); // see if this node is set as private @@ -419,6 +421,21 @@ return $form; } +/** + * Implementation of hook_content_extra_fields(). + */ +function coherent_access_content_extra_fields($type_name) { + $types = variable_get('coherent_access_types', array()); + if (!empty($types) && in_array($type_name, $types)) { + $fields['coherent_access'] = array( + 'label' => t('Coherent Access'), + 'description' => t('Coherent Access module form.'), + 'weight' => COHERENT_ACCESS_TYPE_FIELDS_WEIGHT, + ); + return $fields; + } +} + /** * Implementation of hook_nodeapi */