From 2a123f0ac94cad2771b19ca81b9637f83cb06869 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 21 Aug 2009 14:27:47 +0000 Subject: =?UTF-8?q?-=20Patch=20#549432=20by=20Bohjan,=20G=C3=A1bor=20Hojts?= =?UTF-8?q?y:=20create=20'people=20and=20permissions'=20section=20in=20'co?= =?UTF-8?q?nfiguration=20and=20modules'.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/comment/comment.test | 2 +- modules/contact/contact.test | 2 +- modules/menu/menu.test | 2 +- modules/node/node.module | 2 +- modules/profile/profile.admin.inc | 20 ++++++------- modules/profile/profile.module | 14 ++++----- modules/profile/profile.test | 6 ++-- modules/search/search.test | 2 +- modules/statistics/statistics.module | 2 +- modules/system/system.module | 6 ++-- modules/translation/translation.module | 2 +- modules/upload/upload.module | 2 +- modules/user/user.admin.inc | 10 +++---- modules/user/user.js | 2 +- modules/user/user.module | 55 +++++++++++++++++++++------------- modules/user/user.test | 10 +++---- 16 files changed, 76 insertions(+), 63 deletions(-) (limited to 'modules') diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 039dbfe6f..3ba6b6717 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/settings/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/config/people/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 96311d1d7..51d20d967 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/settings/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/config/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t(' [permission] Saved changes.')); } } diff --git a/modules/menu/menu.test b/modules/menu/menu.test index 6161843a0..c908a3cfa 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/settings/permissions') as $link_path) { + foreach (array('-&-', 'admin/config/people/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 18711dbdd..64a324bac 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -52,7 +52,7 @@ function node_help($path, $arg) { case 'admin/help#node': $output = '

' . 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.') . '

'; $output .= '

' . t('Though each post on your site is a node, each post is also of a particular content type. Content types 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 Publishing options and other workflow controls. By default, the two content types in a standard Drupal installation are Page and Story. Use the content types page 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'))) . '

'; - $output .= '

' . t('The administrative content page 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 permissions page.', array('@content' => url('admin/content'), '@permissions' => url('admin/settings/permissions'))) . '

'; + $output .= '

' . t('The administrative content page 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 permissions page.', array('@content' => url('admin/content'), '@permissions' => url('admin/config/people/permissions'))) . '

'; $output .= '

' . t('For more information, see the online handbook entry for Node module.', array('@node' => 'http://drupal.org/handbook/modules/node/')) . '

'; return $output; diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc index 394f42cb1..5171086e9 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/settings/profile/edit/$field->fid")); - $form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/settings/profile/delete/$field->fid")); + $form[$field->fid]['edit'] = array('#markup' => l(t('edit'), "admin/config/people/profile/edit/$field->fid")); + $form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/config/people/profile/delete/$field->fid")); } // Add the category combo boxes @@ -55,7 +55,7 @@ function profile_admin_overview() { $addnewfields = '

' . t('Add new field') . '

'; $addnewfields .= ''; $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/settings/profile/autocomplete', + '#autocomplete_path' => 'admin/config/people/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/settings/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/config/people/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/settings/profile'; + $form_state['redirect'] = 'admin/config/people/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/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 edit this field 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('Are you sure you want to delete the field %field?', array('%field' => $field->title)), 'admin/config/people/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 edit this field and change it to a hidden profile field so that it may only be accessed by administrators.', array('@edit-field' => url('admin/config/people/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/settings/profile')); + watchdog('profile', 'Profile field %field deleted.', array('%field' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/config/people/profile')); - $form_state['redirect'] = 'admin/settings/profile'; + $form_state['redirect'] = 'admin/config/people/profile'; return; } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 55ff0ac35..7fbd0952a 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -43,7 +43,7 @@ function profile_help($path, $arg) { $output .= '
  • ' . t('date') . '
  • '; $output .= '

    ' . t('For more information, see the online handbook entry for Profile module.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) . '

    '; return $output; - case 'admin/settings/profile': + case 'admin/config/people/profile': return '

    ' . t("This page displays a list of the existing custom profile fields to be displayed on a user's My Account 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. Remember that your changes will not be saved until you click the Save configuration button at the bottom of the page.") . '

    '; } } @@ -82,34 +82,34 @@ function profile_menu() { 'access arguments' => array('access user profiles'), 'type' => MENU_SUGGESTED_ITEM, ); - $items['admin/settings/profile'] = array( + $items['admin/config/people/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/settings/profile/add'] = array( + $items['admin/config/people/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/settings/profile/autocomplete'] = array( + $items['admin/config/people/profile/autocomplete'] = array( 'title' => 'Profile category autocomplete', 'page callback' => 'profile_admin_settings_autocomplete', 'access arguments' => array('administer users'), 'type' => MENU_CALLBACK, ); - $items['admin/settings/profile/edit'] = array( + $items['admin/config/people/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/settings/profile/delete'] = array( + $items['admin/config/people/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 profile field configuration are available.', array('@profile-admin' => url('admin/settings/profile'))), + '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the profile field configuration are available.', array('@profile-admin' => url('admin/config/people/profile'))), ); return $form; } diff --git a/modules/profile/profile.test b/modules/profile/profile.test index aaa2f8a9b..92b9ee428 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/settings/profile/add/' . $type, $edit, t('Save field')); + $this->drupalPost('admin/config/people/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/settings/profile/delete/' . $field['fid'], array(), t('Delete')); - $this->drupalGet('admin/settings/profile'); + $this->drupalPost('admin/config/people/profile/delete/' . $field['fid'], array(), t('Delete')); + $this->drupalGet('admin/config/people/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 0e0b45d74..dc15afa0c 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/settings/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/config/people/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 6f228b845..0463c0158 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 = '

    ' . 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.') . '

    '; $output .= '

    ' . t('The statistics module provides:') . '

    '; - $output .= '