You are here

function devel_node_access_form_alter in Devel 6

Same name and namespace in other branches
  1. 5 devel_node_access.module \devel_node_access_form_alter()
  2. 7 devel_node_access.module \devel_node_access_form_alter()

File

./devel_node_access.module, line 70
This module gives developers feedback as to what their node_access table contains, and which nodes are protected or visible to the public.

Code

function devel_node_access_form_alter(&$form, $form_state, $form_id) {
  $tr = 't';
  if ($form_id == 'devel_admin_settings' || $form_id == 'devel_node_access_admin_settings') {
    $form['devel_node_access_debug_mode'] = array(
      '#type' => 'checkbox',
      '#title' => t('Devel Node Access debug mode'),
      '#default_value' => variable_get('devel_node_access_debug_mode', FALSE),
      '#description' => t('Debug mode verifies the grant records in the node_access table against those that would be set by running !Rebuild_permissions, and displays them all; this can cause considerable overhead.<br />For even more information enable the <a href="@link">%DNAbU block</a>, too.', array(
        '!Rebuild_permissions' => l('[' . $tr('Rebuild permissions') . ']', 'admin/content/node-settings'),
        '%DNAbU' => t('Devel Node Access by User'),
        '@link' => url('admin/build/block/list'),
      )),
    );

    // push these down:
    $form['devel_error_handler']['#weight'] = 1;
    $form['smtp_library']['#weight'] = 1;
    $form['buttons']['#weight'] = 2;
  }
}