diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-06-03 19:22:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-06-03 19:22:18 +0000 |
commit | 2e049e5b785351fce3d92127ab002815baeb953a (patch) | |
tree | a03ec8aa9d9b7adfea0df16944a82b3247dc12e2 /modules/node/node.admin.inc | |
parent | f63727d1765989e424a98f8133adf4ace0157f83 (diff) | |
download | brdo-2e049e5b785351fce3d92127ab002815baeb953a.tar.gz brdo-2e049e5b785351fce3d92127ab002815baeb953a.tar.bz2 |
- Patch #226479 by brianV: 'clean-up' rebuild permission checks.
Diffstat (limited to 'modules/node/node.admin.inc')
-rw-r--r-- | modules/node/node.admin.inc | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index 67790b1f4..d17948155 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -10,25 +10,19 @@ * Menu callback; presents general node configuration options. */ function node_configure() { - // Only show rebuild button if there are either 0, or 2 or more, rows - // in the {node_access} table, or if there are modules that - // implement hook_node_grants(). - if (db_query('SELECT COUNT(*) FROM {node_access}')->fetchField() != 1 || count(module_implements('node_grants')) > 0) { - $status = '<p>' . t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings.') . '</p>'; - $status .= '<p>' . t('Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed posts will automatically use the new permissions.') . '</p>'; - - $form['access'] = array( - '#type' => 'fieldset', - '#title' => t('Node access status'), - ); - $form['access']['status'] = array('#markup' => $status); - $form['access']['rebuild'] = array( - '#type' => 'submit', - '#value' => t('Rebuild permissions'), - '#submit' => array('node_configure_access_submit'), - ); - } + $status = '<p>' . t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings.') . '</p>'; + $status .= '<p>' . t('Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed posts will automatically use the new permissions.') . '</p>'; + $form['access'] = array( + '#type' => 'fieldset', + '#title' => t('Node access status'), + ); + $form['access']['status'] = array('#markup' => $status); + $form['access']['rebuild'] = array( + '#type' => 'submit', + '#value' => t('Rebuild permissions'), + '#submit' => array('node_configure_access_submit'), + ); $form['default_nodes_main'] = array( '#type' => 'select', '#title' => t('Number of posts on main page'), '#default_value' => 10, |