#87700 by webchick. Link to specific modules in permissions.

5.x
Neil Drumm 2006-11-11 23:52:11 +00:00
parent 032bb0adeb
commit 82a36d5d78
2 changed files with 5 additions and 3 deletions

View File

@ -2219,7 +2219,7 @@ function system_admin_by_module() {
// Check for permissions.
if (module_hook($module, 'perm') && $admin_access) {
$admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/access');
$admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/access', NULL, NULL, 'module-'. $module);
}
// Check for menu items that are admin links.

View File

@ -1785,7 +1785,9 @@ function user_admin_perm($rid = NULL) {
$options = array();
foreach (module_list(FALSE, FALSE, TRUE) as $module) {
if ($permissions = module_invoke($module, 'perm')) {
$form['permission'][] = array('#value' => t('@module module', array('@module' => $module)));
$form['permission'][] = array(
'#value' => $module,
);
asort($permissions);
foreach ($permissions as $perm) {
$options[$perm] = '';
@ -1817,7 +1819,7 @@ function theme_user_admin_perm($form) {
$row = array();
// Module name
if (is_numeric($key)) {
$row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => 'module', 'colspan' => count($form['role_names']) + 1);
$row[] = array('data' => t('@module module', array('@module' => drupal_render($form['permission'][$key]))), 'class' => 'module', 'id' => 'module-'. $form['permission'][$key]['#value'], 'colspan' => count($form['role_names']) + 1);
}
else {
$row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => 'permission');