diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-31 19:01:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-31 19:01:03 +0000 |
commit | d4228535043619ada5192001acde645238660b37 (patch) | |
tree | 1c4b55878b06e58bd88239e1ceaa598c429beb63 | |
parent | 9f44fd1b86fdcc412a0ce7b2d3d2048e8564a979 (diff) | |
download | brdo-d4228535043619ada5192001acde645238660b37.tar.gz brdo-d4228535043619ada5192001acde645238660b37.tar.bz2 |
- Patch #536570 by Gábor Hojtsy: implemented new IA for top-level users.
-rw-r--r-- | modules/comment/comment.test | 2 | ||||
-rw-r--r-- | modules/contact/contact.test | 2 | ||||
-rw-r--r-- | modules/dblog/dblog.test | 2 | ||||
-rw-r--r-- | modules/help/help.api.php | 2 | ||||
-rw-r--r-- | modules/menu/menu.test | 2 | ||||
-rw-r--r-- | modules/node/node.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.admin.inc | 20 | ||||
-rw-r--r-- | modules/profile/profile.module | 14 | ||||
-rw-r--r-- | modules/profile/profile.test | 6 | ||||
-rw-r--r-- | modules/search/search.test | 2 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 2 | ||||
-rw-r--r-- | modules/system/system.module | 11 | ||||
-rw-r--r-- | modules/translation/translation.module | 2 | ||||
-rw-r--r-- | modules/upload/upload.module | 2 | ||||
-rw-r--r-- | modules/user/user.admin.inc | 12 | ||||
-rw-r--r-- | modules/user/user.api.php | 2 | ||||
-rw-r--r-- | modules/user/user.module | 37 | ||||
-rw-r--r-- | modules/user/user.pages.inc | 2 | ||||
-rw-r--r-- | modules/user/user.test | 14 |
19 files changed, 65 insertions, 73 deletions
diff --git a/modules/comment/comment.test b/modules/comment/comment.test index fc10b1e90..baadc2f03 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -176,7 +176,7 @@ class CommentHelperCase extends DrupalWebTestCase { $edit['1[access comments]'] = $access_comments; $edit['1[post comments]'] = $post_comments; $edit['1[post comments without approval]'] = $without_approval; - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Anonymous user comments ' . ($access_comments ? 'access comments' : 'not access comments'). '.')); } diff --git a/modules/contact/contact.test b/modules/contact/contact.test index aa02bf7b8..96311d1d7 100644 --- a/modules/contact/contact.test +++ b/modules/contact/contact.test @@ -289,7 +289,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase { $edit[$rid . '[' . $name . ']'] = $value; } - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t(' [permission] Saved changes.')); } } diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index 35937270d..31162cf90 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -185,7 +185,7 @@ class DBLogTestCase extends DrupalWebTestCase { $edit['pass[pass1]'] = $pass; $edit['pass[pass2]'] = $pass; $edit['status'] = 1; - $this->drupalPost('admin/user/user/create', $edit, t('Create new account')); + $this->drupalPost('admin/user/create', $edit, t('Create new account')); $this->assertResponse(200); // Retrieve user object. $user = user_load_by_name($name); diff --git a/modules/help/help.api.php b/modules/help/help.api.php index a8d5997b6..17962a63a 100644 --- a/modules/help/help.api.php +++ b/modules/help/help.api.php @@ -46,7 +46,7 @@ * $output .= 'A role defines a group of users that have certain * privileges as defined in %permission.'; * $output = t($output, array('%permission' => l(t('user permissions'), - * 'admin/user/permission'))); + * 'admin/settings/permission'))); * * For a detailed usage example, see page_example.module. */ diff --git a/modules/menu/menu.test b/modules/menu/menu.test index 6f2f2d32e..afb1a2405 100644 --- a/modules/menu/menu.test +++ b/modules/menu/menu.test @@ -249,7 +249,7 @@ class MenuTestCase extends DrupalWebTestCase { * @param string $menu_name Menu name. */ function addInvalidMenuLink($menu_name = 'navigation') { - foreach (array('-&-', 'admin/user/permissions') as $link_path) { + foreach (array('-&-', 'admin/settings/permissions') as $link_path) { $edit = array( 'menu[link_path]' => $link_path, 'menu[link_title]' => 'title', diff --git a/modules/node/node.module b/modules/node/node.module index e8bda4815..19c636fa7 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -37,7 +37,7 @@ function node_help($path, $arg) { case 'admin/help#node': $output = '<p>' . t('The node module manages content on your site, and stores all posts (regardless of type) as a "node" . In addition to basic publishing settings, including whether the post has been published, promoted to the site front page, or should remain present (or sticky) at the top of lists, the node module also records basic information about the author of a post. Optional revision control over edits is available. For additional functionality, the node module is often extended by other modules.') . '</p>'; $output .= '<p>' . t('Though each post on your site is a node, each post is also of a particular <a href="@content-type">content type</a>. <a href="@content-type">Content types</a> are used to define the characteristics of a post, including the title and description of the fields displayed on its add and edit pages. Each content type may have different default settings for <em>Publishing options</em> and other workflow controls. By default, the two content types in a standard Drupal installation are <em>Page</em> and <em>Story</em>. Use the <a href="@content-type">content types page</a> to add new or edit existing content types. Additional content types also become available as you enable additional core, contributed and custom modules.', array('@content-type' => url('admin/structure/types'))) . '</p>'; - $output .= '<p>' . t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content'), '@permissions' => url('admin/user/permissions'))) . '</p>'; + $output .= '<p>' . t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content'), '@permissions' => url('admin/settings/permissions'))) . '</p>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@node">Node module</a>.', array('@node' => 'http://drupal.org/handbook/modules/node/')) . '</p>'; return $output; case 'admin/content': diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc index bf1627f4f..394f42cb1 100644 --- a/modules/profile/profile.admin.inc +++ b/modules/profile/profile.admin.inc @@ -27,8 +27,8 @@ function profile_admin_overview() { $form[$field->fid]['type'] = array('#markup' => $field->type); $form[$field->fid]['category'] = array('#type' => 'select', '#default_value' => $field->category, '#options' => array()); $form[$field->fid]['weight'] = array('#type' => 'weight', '#default_value' => $field->weight); - $form[$field->fid]['edit'] = array('#markup' => l(t('edit'), "admin/user/profile/edit/$field->fid")); - $form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/user/profile/delete/$field->fid")); + $form[$field->fid]['edit'] = array('#markup' => l(t('edit'), "admin/settings/profile/edit/$field->fid")); + $form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/settings/profile/delete/$field->fid")); } // Add the category combo boxes @@ -55,7 +55,7 @@ function profile_admin_overview() { $addnewfields = '<h2>' . t('Add new field') . '</h2>'; $addnewfields .= '<ul>'; foreach (_profile_field_types() as $key => $value) { - $addnewfields .= '<li>' . l($value, "admin/user/profile/add/$key") . '</li>'; + $addnewfields .= '<li>' . l($value, "admin/settings/profile/add/$key") . '</li>'; } $addnewfields .= '</ul>'; $form['addnewfields'] = array('#markup' => $addnewfields); @@ -219,7 +219,7 @@ function profile_field_form(&$form_state, $arg = NULL) { $form['fields']['category'] = array('#type' => 'textfield', '#title' => t('Category'), '#default_value' => $edit['category'], - '#autocomplete_path' => 'admin/user/profile/autocomplete', + '#autocomplete_path' => 'admin/settings/profile/autocomplete', '#description' => t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'), '#required' => TRUE, ); @@ -361,7 +361,7 @@ function profile_field_form_submit($form, &$form_state) { ->fields($values) ->execute(); drupal_set_message(t('The field has been created.')); - watchdog('profile', 'Profile field %field added under category %category.', array('%field' => $form_state['values']['title'], '%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); + watchdog('profile', 'Profile field %field added under category %category.', array('%field' => $form_state['values']['title'], '%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile')); } else { db_update('profile_field') @@ -373,7 +373,7 @@ function profile_field_form_submit($form, &$form_state) { cache_clear_all(); menu_rebuild(); - $form_state['redirect'] = 'admin/user/profile'; + $form_state['redirect'] = 'admin/settings/profile'; return; } @@ -390,8 +390,8 @@ function profile_field_delete(&$form_state, $fid) { $form['title'] = array('#type' => 'value', '#value' => $field->title); return confirm_form($form, - t('Are you sure you want to delete the field %field?', array('%field' => $field->title)), 'admin/user/profile', - t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="@edit-field">edit this field</a> and change it to a hidden profile field so that it may only be accessed by administrators.', array('@edit-field' => url('admin/user/profile/edit/' . $fid))), + t('Are you sure you want to delete the field %field?', array('%field' => $field->title)), 'admin/settings/profile', + t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="@edit-field">edit this field</a> and change it to a hidden profile field so that it may only be accessed by administrators.', array('@edit-field' => url('admin/settings/profile/edit/' . $fid))), t('Delete'), t('Cancel')); } @@ -409,9 +409,9 @@ function profile_field_delete_submit($form, &$form_state) { cache_clear_all(); drupal_set_message(t('The field %field has been deleted.', array('%field' => $form_state['values']['title']))); - watchdog('profile', 'Profile field %field deleted.', array('%field' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); + watchdog('profile', 'Profile field %field deleted.', array('%field' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile')); - $form_state['redirect'] = 'admin/user/profile'; + $form_state['redirect'] = 'admin/settings/profile'; return; } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index bc3ecd6b6..4d85e4c76 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -43,7 +43,7 @@ function profile_help($path, $arg) { $output .= '<li>' . t('date') . '</li></ul>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@profile">Profile module</a>.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) . '</p>'; return $output; - case 'admin/user/profile': + case 'admin/settings/profile': return '<p>' . t("This page displays a list of the existing custom profile fields to be displayed on a user's <em>My Account</em> page. To provide structure, similar or related fields may be placed inside a category. To add a new category (or edit an existing one), edit a profile field and provide a new category name. To change the category of a field or the order of fields within a category, grab a drag-and-drop handle under the Title column and drag the field to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save configuration</em> button at the bottom of the page.") . '</p>'; } } @@ -82,34 +82,34 @@ function profile_menu() { 'access arguments' => array('access user profiles'), 'type' => MENU_SUGGESTED_ITEM, ); - $items['admin/user/profile'] = array( + $items['admin/settings/profile'] = array( 'title' => 'Profiles', 'description' => 'Create customizable fields for your users.', 'page callback' => 'drupal_get_form', 'page arguments' => array('profile_admin_overview'), 'access arguments' => array('administer users'), ); - $items['admin/user/profile/add'] = array( + $items['admin/settings/profile/add'] = array( 'title' => 'Add field', 'page callback' => 'drupal_get_form', 'page arguments' => array('profile_field_form'), 'access arguments' => array('administer users'), 'type' => MENU_CALLBACK, ); - $items['admin/user/profile/autocomplete'] = array( + $items['admin/settings/profile/autocomplete'] = array( 'title' => 'Profile category autocomplete', 'page callback' => 'profile_admin_settings_autocomplete', 'access arguments' => array('administer users'), 'type' => MENU_CALLBACK, ); - $items['admin/user/profile/edit'] = array( + $items['admin/settings/profile/edit'] = array( 'title' => 'Edit field', 'page callback' => 'drupal_get_form', 'page arguments' => array('profile_field_form'), 'access arguments' => array('administer users'), 'type' => MENU_CALLBACK, ); - $items['admin/user/profile/delete'] = array( + $items['admin/settings/profile/delete'] = array( 'title' => 'Delete field', 'page callback' => 'drupal_get_form', 'page arguments' => array('profile_field_delete'), @@ -150,7 +150,7 @@ function profile_block_configure($delta = '') { '#title' => t('Profile fields to display'), '#default_value' => variable_get('profile_block_author_fields', array()), '#options' => $fields, - '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the <a href="@profile-admin">profile field configuration</a> are available.', array('@profile-admin' => url('admin/user/profile'))), + '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the <a href="@profile-admin">profile field configuration</a> are available.', array('@profile-admin' => url('admin/settings/profile'))), ); return $form; } diff --git a/modules/profile/profile.test b/modules/profile/profile.test index ac6872efa..aaa2f8a9b 100644 --- a/modules/profile/profile.test +++ b/modules/profile/profile.test @@ -36,7 +36,7 @@ class ProfileTestCase extends DrupalWebTestCase { $edit['category'] = $category; $edit['explanation'] = $this->randomName(50); - $this->drupalPost('admin/user/profile/add/' . $type, $edit, t('Save field')); + $this->drupalPost('admin/settings/profile/add/' . $type, $edit, t('Save field')); $fid = db_query("SELECT fid FROM {profile_field} WHERE title = :title", array(':title' => $title))->fetchField(); $this->assertTrue($fid, t('New Profile field has been entered in the database')); @@ -107,8 +107,8 @@ class ProfileTestCase extends DrupalWebTestCase { * The field to be deleted. */ function deleteProfileField($field) { - $this->drupalPost('admin/user/profile/delete/' . $field['fid'], array(), t('Delete')); - $this->drupalGet('admin/user/profile'); + $this->drupalPost('admin/settings/profile/delete/' . $field['fid'], array(), t('Delete')); + $this->drupalGet('admin/settings/profile'); $this->assertNoText($field['title'], t('Checking deleted field %title', array('%title' => $field['title']))); } } diff --git a/modules/search/search.test b/modules/search/search.test index f893c1066..0e0b45d74 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -475,7 +475,7 @@ class SearchCommentTestCase extends DrupalWebTestCase { // seems to be added via node links. DRUPAL_ANONYMOUS_RID . '[post comments]' => 1, ); - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); // Create a node. $node = $this->drupalCreateNode(array('type' => 'article')); diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 1b198deb8..6f228b845 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -14,7 +14,7 @@ function statistics_help($path, $arg) { case 'admin/help#statistics': $output = '<p>' . t('The statistics module keeps track of numerous site usage statistics, including the number of times, and from where, each of your posts is viewed. These statistics are useful in determining how users are interacting with each other and with your site, and are required for the display of some Drupal blocks.') . '</p>'; $output .= '<p>' . t('The statistics module provides:') . '</p>'; - $output .= '<ul><li>' . t('a counter for each post on your site that increments each time the post is viewed. (Enable <em>Count content views</em> on the <a href="@statistics-settings">statistics settings page</a>, and determine if the post access counters should be visible to any user roles on the <a href="@permissions">permissions page</a>.)', array('@statistics-settings' => url('admin/settings/statistics'), '@permissions' => url('admin/user/permissions'))) . '</li>'; + $output .= '<ul><li>' . t('a counter for each post on your site that increments each time the post is viewed. (Enable <em>Count content views</em> on the <a href="@statistics-settings">statistics settings page</a>, and determine if the post access counters should be visible to any user roles on the <a href="@permissions">permissions page</a>.)', array('@statistics-settings' => url('admin/settings/statistics'), '@permissions' => url('admin/settings/permissions'))) . '</li>'; $output .= '<li>' . t('a <a href="@recent-hits">recent hits</a> log that displays information about the latest activity on your site, including the URL and title of the page accessed, the user name (if available) and IP address of the accessing party.', array('@recent-hits' => url('admin/reports/hits'))) . '</li>'; $output .= '<li>' . t('a <a href="@top-referrers">top referrers</a> log that displays the referring parties for your site visits (where your visitors came from).', array('@top-referrers' => url('admin/reports/referrers'))) . '</li>'; $output .= '<li>' . t('a <a href="@top-pages">top pages</a> log that displays site content in descending order by number of views.', array('@top-pages' => url('admin/reports/pages'))) . '</li>'; diff --git a/modules/system/system.module b/modules/system/system.module index 05a68fb3d..bcd4b8d7d 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -112,8 +112,8 @@ function system_help($path, $arg) { case 'admin/appearance/settings': return '<p>' . t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') . '</p>'; case 'admin/structure/modules': - $output = '<p>' . t('Modules are plugins that extend Drupal\'s core functionality. To further extend your site\'s functionality, a number of <a href="@modules">contributed modules</a> are available for download.', array('@permissions' => url('admin/user/permissions'), '@modules' => 'http://drupal.org/project/modules')) . '</p>'; - $output .= '<p>' . t('Module-related tasks can be located on the <a href="@by-module">administration by module page</a>. New <a href="@permissions">module-related permissions</a> may also become available as new modules are enabled.', array('@by-module' => url('admin/by-module'), '@permissions' => url('admin/user/permissions'))) . '</p>'; + $output = '<p>' . t('Modules are plugins that extend Drupal\'s core functionality. To further extend your site\'s functionality, a number of <a href="@modules">contributed modules</a> are available for download.', array('@permissions' => url('admin/settings/permissions'), '@modules' => 'http://drupal.org/project/modules')) . '</p>'; + $output .= '<p>' . t('Module-related tasks can be located on the <a href="@by-module">administration by module page</a>. New <a href="@permissions">module-related permissions</a> may also become available as new modules are enabled.', array('@by-module' => url('admin/by-module'), '@permissions' => url('admin/settings/permissions'))) . '</p>'; $output .= '<p>' . t('Each time a module is updated, it is important that <a href="@update-php">update.php</a> is run. To help manage the update process, the <em>Update status</em> module, if enabled, provides <a href="@updates">information on new versions of modules (and themes)</a> as they are released. Regular review of the <a href="@updates">available updates page</a> is essential to maintaining a secure and current site.', array('@update-php' => $base_url . '/update.php', '@updates' => url('admin/reports/updates'))) . '</p>'; return $output; case 'admin/structure/modules/uninstall': @@ -524,7 +524,7 @@ function system_menu() { 'title' => 'Site configuration', 'description' => 'Configure site settings.', 'position' => 'right', - 'weight' => -5, + 'weight' => -2, 'page callback' => 'system_settings_overview', 'access callback' => 'system_admin_menu_block_access', 'access arguments' => array('admin/settings', 'access administration pages'), @@ -533,7 +533,7 @@ function system_menu() { 'title' => 'Structure', 'description' => 'Control how your site looks and feels.', 'position' => 'right', - 'weight' => -10, + 'weight' => -8, 'page callback' => 'system_admin_menu_block_page', 'access callback' => 'system_admin_menu_block_access', 'access arguments' => array('admin/structure', 'access administration pages'), @@ -544,6 +544,7 @@ function system_menu() { 'page callback' => 'drupal_get_form', 'page arguments' => array('system_themes_form'), 'access arguments' => array('administer site configuration'), + 'weight' => -6, ); $items['admin/appearance/select'] = array( 'title' => 'List', @@ -2240,7 +2241,7 @@ function system_get_module_admin_tasks($module) { $admin_task_count = 0; // Check for permissions. if (in_array($module, module_implements('permission')) && $admin_access) { - $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-' . $module)); + $admin_tasks[-1] = l(t('Configure permissions'), 'admin/settings/permissions', array('fragment' => 'module-' . $module)); } // Check for menu items that are admin links. diff --git a/modules/translation/translation.module b/modules/translation/translation.module index 06339dde9..4dc25c3f1 100644 --- a/modules/translation/translation.module +++ b/modules/translation/translation.module @@ -33,7 +33,7 @@ function translation_help($path, $arg) { case 'admin/help#translation': $output = '<p>' . t('The content translation module allows content to be translated into different languages. Working with the <a href="@locale">locale module</a> (which manages enabled languages and provides translation for the site interface), the content translation module is key to creating and maintaining translated site content.', array('@locale' => url('admin/help/locale'))) . '</p>'; $output .= '<p>' . t('Configuring content translation and translation-enabled content types:') . '</p>'; - $output .= '<ul><li>' . t('Assign the <em>translate content</em> permission to the appropriate user roles at the <a href="@permissions">Permissions configuration page</a>.', array('@permissions' => url('admin/user/permissions'))) . '</li>'; + $output .= '<ul><li>' . t('Assign the <em>translate content</em> permission to the appropriate user roles at the <a href="@permissions">Permissions configuration page</a>.', array('@permissions' => url('admin/settings/permissions'))) . '</li>'; $output .= '<li>' . t('Add and enable desired languages at the <a href="@languages">Languages configuration page</a>.', array('@languages' => url('admin/settings/language'))) . '</li>'; $output .= '<li>' . t('Determine which <a href="@content-types">content types</a> should support translation features. To enable translation support for a content type, edit the type and at the <em>Multilingual support</em> drop down, select <em>Enabled, with translation</em>. (<em>Multilingual support</em> is located within <em>Publishing options</em>.) Be sure to save each content type after enabling multilingual support.', array('@content-types' => url('admin/structure/types'))) . '</li></ul>'; $output .= '<p>' . t('Working with translation-enabled content types:') . '</p>'; diff --git a/modules/upload/upload.module b/modules/upload/upload.module index c73724c3a..b04b92894 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -18,7 +18,7 @@ function upload_help($path, $arg) { $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@upload">Upload module</a>.', array('@upload' => 'http://drupal.org/handbook/modules/upload/')) . '</p>'; return $output; case 'admin/settings/upload': - return '<p>' . t('Users with the <a href="@permissions">upload files permission</a> can upload attachments. Users with the <a href="@permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="@types">content types settings</a> page.', array('@permissions' => url('admin/user/permissions'), '@types' => url('admin/settings/types'))) . '</p>'; + return '<p>' . t('Users with the <a href="@permissions">upload files permission</a> can upload attachments. Users with the <a href="@permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="@types">content types settings</a> page.', array('@permissions' => url('admin/settings/permissions'), '@types' => url('admin/settings/types'))) . '</p>'; } } diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index a71033bcb..6a05e6552 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -114,7 +114,7 @@ function user_filter_form_submit($form, &$form_state) { return; } - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; return; } @@ -297,7 +297,7 @@ function user_admin_settings() { $form['registration_cancellation']['user_cancel_method'] = array( '#type' => 'item', '#title' => t('When cancelling a user account'), - '#description' => t('Users with the %select-cancel-method or %administer-users <a href="@permissions-url">permissions</a> can override this default method.', array('%select-cancel-method' => t('Select method for cancelling account'), '%administer-users' => t('Administer users'), '@permissions-url' => url('admin/user/permissions'))), + '#description' => t('Users with the %select-cancel-method or %administer-users <a href="@permissions-url">permissions</a> can override this default method.', array('%select-cancel-method' => t('Select method for cancelling account'), '%administer-users' => t('Administer users'), '@permissions-url' => url('admin/settings/permissions'))), ); $form['registration_cancellation']['user_cancel_method'] += user_cancel_methods(); foreach (element_children($form['registration_cancellation']['user_cancel_method']) as $element) { @@ -728,7 +728,7 @@ function user_admin_role() { $rid = arg(4); if ($rid) { if ($rid == DRUPAL_ANONYMOUS_RID || $rid == DRUPAL_AUTHENTICATED_RID) { - drupal_goto('admin/user/roles'); + drupal_goto('admin/settings/roles'); } // Display the edit role form. $role = db_query('SELECT * FROM {role} WHERE rid = :rid', array(':rid' => $rid))->fetchObject(); @@ -817,7 +817,7 @@ function user_admin_role_submit($form, &$form_state) { ->execute(); drupal_set_message(t('The role has been added.')); } - $form_state['redirect'] = 'admin/user/roles'; + $form_state['redirect'] = 'admin/settings/roles'; return; } @@ -874,9 +874,9 @@ function theme_user_admin_account($form) { function theme_user_admin_new_role($form) { $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => 2)); foreach (user_roles() as $rid => $name) { - $edit_permissions = l(t('edit permissions'), 'admin/user/permissions/' . $rid); + $edit_permissions = l(t('edit permissions'), 'admin/settings/permissions/' . $rid); if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) { - $rows[] = array($name, l(t('edit role'), 'admin/user/roles/edit/' . $rid), $edit_permissions); + $rows[] = array($name, l(t('edit role'), 'admin/settings/roles/edit/' . $rid), $edit_permissions); } else { $rows[] = array($name, t('locked'), $edit_permissions); diff --git a/modules/user/user.api.php b/modules/user/user.api.php index ff679ecdf..2030422ae 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -221,7 +221,7 @@ function hook_user_cancel_methods_alter(&$methods) { * Add mass user operations. * * This hook enables modules to inject custom operations into the mass operations - * dropdown found at admin/user/user, by associating a callback function with + * dropdown found at admin/user, by associating a callback function with * the operation, which is called when the form is submitted. The callback function * receives one initial argument, which is an array of the checked users. * diff --git a/modules/user/user.module b/modules/user/user.module index 4a103fcb2..5caa06db4 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1315,26 +1315,18 @@ function user_menu() { // User administration pages. $items['admin/user'] = array( - 'title' => 'User management', - 'description' => "Manage your site's users, groups and access to site features.", - 'position' => 'left', - 'page callback' => 'system_admin_menu_block_page', - 'access callback' => 'system_admin_menu_block_access', - 'access arguments' => array('admin/user', 'access administration pages'), - ); - $items['admin/user/user'] = array( 'title' => 'Users', - 'description' => 'List, add, and edit users.', 'page callback' => 'user_admin', 'page arguments' => array('list'), 'access arguments' => array('administer users'), + 'weight' => -4, ); - $items['admin/user/user/list'] = array( + $items['admin/user/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); - $items['admin/user/user/create'] = array( + $items['admin/user/create'] = array( 'title' => 'Add user', 'page arguments' => array('create'), 'access arguments' => array('administer users'), @@ -1349,21 +1341,21 @@ function user_menu() { ); // Permission administration pages. - $items['admin/user/permissions'] = array( + $items['admin/settings/permissions'] = array( 'title' => 'Permissions', 'description' => 'Determine access to features by selecting permissions for roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_permissions'), 'access arguments' => array('administer permissions'), ); - $items['admin/user/roles'] = array( + $items['admin/settings/roles'] = array( 'title' => 'Roles', 'description' => 'List, edit, or add user roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_new_role'), 'access arguments' => array('administer permissions'), ); - $items['admin/user/roles/edit'] = array( + $items['admin/settings/roles/edit'] = array( 'title' => 'Edit role', 'page arguments' => array('user_admin_role'), 'access arguments' => array('administer permissions'), @@ -2320,7 +2312,7 @@ function user_multiple_cancel_confirm(&$form_state) { return confirm_form($form, t('Are you sure you want to cancel these user accounts?'), - 'admin/user/user', t('This action cannot be undone.'), + 'admin/user', t('This action cannot be undone.'), t('Cancel accounts'), t('Cancel')); } @@ -2347,7 +2339,7 @@ function user_multiple_cancel_confirm_submit($form, &$form_state) { } } } - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; return; } @@ -2364,17 +2356,16 @@ function user_help($path, $arg) { $output .= '<p>' . t('A visitor accessing your website is assigned a unique ID, or session ID, which is stored in a cookie. The cookie does not contain personal information, but acts as a key to retrieve information from your site. Users should have cookies enabled in their web browser when using your site.') . '</p>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@user">User module</a>.', array('@user' => 'http://drupal.org/handbook/modules/user/')) . '</p>'; return $output; - case 'admin/user/user/create': - case 'admin/user/user/account/create': + case 'admin/user/create': return '<p>' . t("This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique.") . '</p>'; - case 'admin/user/permissions': - return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href="@role">Roles</a> page to create a role). Two important roles to consider are Authenticated Users and Administrators. Any permissions granted to the Authenticated Users role will be given to any user who can log into your site. You can make any role the Administrator role for the site, meaning this will be granted all new permissions automatically. You can do this on the <a href="@settings">User Settings</a> page. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('@role' => url('admin/user/roles'), '@settings' => url('admin/settings/user'))) . '</p>'; - case 'admin/user/roles': + case 'admin/settings/permissions': + return '<p>' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the <a href="@role">Roles</a> page to create a role). Two important roles to consider are Authenticated Users and Administrators. Any permissions granted to the Authenticated Users role will be given to any user who can log into your site. You can make any role the Administrator role for the site, meaning this will be granted all new permissions automatically. You can do this on the <a href="@settings">User Settings</a> page. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('@role' => url('admin/settings/roles'), '@settings' => url('admin/settings/user'))) . '</p>'; + case 'admin/settings/roles': return t('<p>Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in <a href="@permissions">user permissions</a>. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the <em>role names</em> of the various roles. To delete a role choose "edit".</p><p>By default, Drupal comes with two user roles:</p> <ul> <li>Anonymous user: this role is used for users that don\'t have a user account or that are not authenticated.</li> <li>Authenticated user: this role is automatically granted to all logged in users.</li> - </ul>', array('@permissions' => url('admin/user/permissions'))); + </ul>', array('@permissions' => url('admin/settings/permissions'))); case 'admin/user/search': return '<p>' . t('Enter a simple pattern ("*" may be used as a wildcard match) to search for a username or e-mail address. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda@example.com".') . '</p>'; } @@ -2874,7 +2865,7 @@ function user_register() { '#title' => t('Notify user of new account') ); // Redirect back to page which initiated the create request; - // usually admin/user/user/create. + // usually admin/user/create. $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index bfeea5778..31783cd0b 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -411,7 +411,7 @@ function user_cancel_confirm_form_submit($form, &$form_state) { user_cancel($form_state['values'], $account->uid, $form_state['values']['user_cancel_method']); if (!isset($_REQUEST['destination'])) { - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; } } else { diff --git a/modules/user/user.test b/modules/user/user.test index fb9732f3a..bed823f9b 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -475,7 +475,7 @@ class UserCancelTestCase extends DrupalWebTestCase { $edit['accounts[' . $uid . ']'] = TRUE; } $edit['accounts[' . $admin_user->uid . ']'] = TRUE; - $this->drupalPost('admin/user/user', $edit, t('Update')); + $this->drupalPost('admin/user', $edit, t('Update')); $this->assertText(t('Are you sure you want to cancel these user accounts?'), t('Confirmation form to cancel accounts displayed.')); $this->assertText(t('When cancelling these accounts'), t('Allows to select account cancellation method.')); $this->assertText(t('Require e-mail confirmation to cancel account.'), t('Allows to send confirmation mail.')); @@ -753,7 +753,7 @@ class UserPermissionsTestCase extends DrupalWebTestCase { $this->assertFalse(user_access('administer nodes', $account, TRUE), t('User does not have "administer nodes" permission.')); $edit = array(); $edit[$rid . '[administer nodes]'] = TRUE; - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.')); $this->assertTrue(user_access('administer nodes', $account, TRUE), t('User now has "administer nodes" permission.')); @@ -761,7 +761,7 @@ class UserPermissionsTestCase extends DrupalWebTestCase { $this->assertTrue(user_access('access user profiles', $account, TRUE), t('User has "access user profiles" permission.')); $edit = array(); $edit[$rid . '[access user profiles]'] = FALSE; - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.')); $this->assertFalse(user_access('access user profiles', $account, TRUE), t('User no longer has "access user profiles" permission.')); } @@ -809,7 +809,7 @@ class UserAdminTestCase extends DrupalWebTestCase { // Create admin user to delete registered user. $admin_user = $this->drupalCreateUser(array('administer users')); $this->drupalLogin($admin_user); - $this->drupalGet('admin/user/user'); + $this->drupalGet('admin/user'); $this->assertText($user_a->name, t('Found user A on admin users page')); $this->assertText($user_b->name, t('Found user B on admin users page')); $this->assertText($user_c->name, t('Found user C on admin users page')); @@ -819,7 +819,7 @@ class UserAdminTestCase extends DrupalWebTestCase { $edit = array(); $edit['filter'] = 'permission'; $edit['permission'] = 'administer taxonomy'; - $this->drupalPost('admin/user/user', $edit, t('Filter')); + $this->drupalPost('admin/user', $edit, t('Filter')); // Check if the correct users show up. $this->assertNoText($user_a->name, t('User A not on filtered by perm admin users page')); @@ -832,7 +832,7 @@ class UserAdminTestCase extends DrupalWebTestCase { $edit = array(); $edit['operation'] = 'block'; $edit['accounts[' . $account->uid . ']'] = TRUE; - $this->drupalPost('admin/user/user', $edit, t('Update')); + $this->drupalPost('admin/user', $edit, t('Update')); $account = user_load($user_b->uid, TRUE); $this->assertEqual($account->status, 0, 'User B blocked'); } @@ -961,7 +961,7 @@ class UserBlocksUnitTests extends DrupalWebTestCase { $edit = array(); $edit['name'] = $user->name; $edit['pass'] = $user->pass_raw; - $this->drupalPost('admin/user/permissions', $edit, t('Log in')); + $this->drupalPost('admin/settings/permissions', $edit, t('Log in')); $this->assertText(t('Log out'), t('Logged in.')); // Check that we are still on the same page. |