Commit 82a36d5d authored by drumm's avatar drumm
Browse files

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

parent 032bb0ad
......@@ -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.
......
......@@ -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');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment