Commit ed65c9b8 authored by Dries's avatar Dries
Browse files

- Patch #510740 by agentrickard: rename user_admin_perm() to user_admin_permission().

parent 19dd7c96
...@@ -585,10 +585,10 @@ function user_admin_settings() { ...@@ -585,10 +585,10 @@ function user_admin_settings() {
* Menu callback: administer permissions. * Menu callback: administer permissions.
* *
* @ingroup forms * @ingroup forms
* @see user_admin_perm_submit() * @see user_admin_permissions_submit()
* @see theme_user_admin_perm() * @see theme_user_admin_permissions()
*/ */
function user_admin_perm($form_state, $rid = NULL) { function user_admin_permissions($form_state, $rid = NULL) {
// Retrieve role names for columns. // Retrieve role names for columns.
$role_names = user_roles(); $role_names = user_roles();
...@@ -645,9 +645,9 @@ function user_admin_perm($form_state, $rid = NULL) { ...@@ -645,9 +645,9 @@ function user_admin_perm($form_state, $rid = NULL) {
/** /**
* Save permissions selected on the administer permissions page. * Save permissions selected on the administer permissions page.
* *
* @see user_admin_perm * @see user_admin_permissions()
*/ */
function user_admin_perm_submit($form, &$form_state) { function user_admin_permissions_submit($form, &$form_state) {
foreach ($form_state['values']['role_names'] as $rid => $name) { foreach ($form_state['values']['role_names'] as $rid => $name) {
$checked = array_filter($form_state['values'][$rid]); $checked = array_filter($form_state['values'][$rid]);
// Delete existing permissions for the role. This handles "unchecking" checkboxes. // Delete existing permissions for the role. This handles "unchecking" checkboxes.
...@@ -675,7 +675,7 @@ function user_admin_perm_submit($form, &$form_state) { ...@@ -675,7 +675,7 @@ function user_admin_perm_submit($form, &$form_state) {
* *
* @ingroup themeable * @ingroup themeable
*/ */
function theme_user_admin_perm($form) { function theme_user_admin_permissions($form) {
$roles = user_roles(); $roles = user_roles();
foreach (element_children($form['permission']) as $key) { foreach (element_children($form['permission']) as $key) {
$row = array(); $row = array();
......
...@@ -57,7 +57,7 @@ function user_theme() { ...@@ -57,7 +57,7 @@ function user_theme() {
'user_list' => array( 'user_list' => array(
'arguments' => array('users' => NULL, 'title' => NULL), 'arguments' => array('users' => NULL, 'title' => NULL),
), ),
'user_admin_perm' => array( 'user_admin_permissions' => array(
'arguments' => array('form' => NULL), 'arguments' => array('form' => NULL),
'file' => 'user.admin.inc', 'file' => 'user.admin.inc',
), ),
...@@ -1334,7 +1334,7 @@ function user_menu() { ...@@ -1334,7 +1334,7 @@ function user_menu() {
'title' => 'Permissions', 'title' => 'Permissions',
'description' => 'Determine access to features by selecting permissions for roles.', 'description' => 'Determine access to features by selecting permissions for roles.',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('user_admin_perm'), 'page arguments' => array('user_admin_permissions'),
'access arguments' => array('administer permissions'), 'access arguments' => array('administer permissions'),
); );
$items['admin/user/roles'] = array( $items['admin/user/roles'] = array(
......
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