Add a hook_init to use administration theme for grant page.

Currently your_site/node/nn/grant page is not concerned by administration theme.

This could be easily done by using hook_init() function :

/**
 * Implementation of hook_init().
 */
function nodeaccess_init() {

  // Use the administrative theme if the user is looking at a page in the admin/* path.
  if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(2) == 'grant')) {
    global $custom_theme;
    $custom_theme = variable_get('admin_theme', '0');
    drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  }

}

I've just tested this code on my own module and at first sight it works well.

Comments

vlad.pavlovic’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Version 6.x will not be getting any more new features.
For version 7.x-1.x, I plan on removing the `Grant` tab and having the Nodeaccess settings be part of the Node form.