diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3ba1cd88cdccc7e9add951e2c477e87488f6936c..079660e8d44abddc9e63e3990f88c7687ac587f2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,7 +19,7 @@ Drupal 7.0, xxxx-xx-xx (development version) * Implemented drag-and-drop positioning for input format listings. * Implemented drag-and-drop positioning for language listing. * Implemented drag-and-drop positioning for poll options. - * Provided descriptions for user permissions. + * Provided descriptions and human-readable names for user permissions. * Removed comment controls for users. * Removed display order settings for comment module. Comment display order can now be customised using the Views module. diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 758c2b4dcf20cb2daa2db66277299f0d163fc2e3..70d1538cb426e9520c1cbafea3edefaae522ce7c 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -270,8 +270,14 @@ function _aggregator_has_categories() { */ function aggregator_perm() { return array( - 'administer news feeds' => t('Add, edit or delete news feeds that are aggregated to your site.'), - 'access news feeds' => t('View aggregated news feed items.'), + 'administer news feeds' => array( + 'title' => t('Administer news feeds'), + 'description' => t('Add, edit or delete news feeds that are aggregated to your site.'), + ), + 'access news feeds' => array( + 'title' => t('Access news feeds'), + 'description' => t('View aggregated news feed items.'), + ), ); } diff --git a/modules/block/block.module b/modules/block/block.module index 7c976ad243b9ac8ea5921f4c4cb0020d32078e41..f56e428dc94cf8aee3a9af602488708ec3d87568 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -105,8 +105,14 @@ function block_theme() { */ function block_perm() { return array( - 'administer blocks' => t('Select which blocks are displayed, and arrange them on the page.'), - 'use PHP for block visibility' => t('Enter PHP code in the field for block visibility settings. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + 'administer blocks' => array( + 'title' => t('Administer blocks'), + 'description' => t('Select which blocks are displayed, and arrange them on the page.'), + ), + 'use PHP for block visibility' => array( + 'title' => t('Use PHP for block visibility'), + 'description' => t('Enter PHP code in the field for block visibility settings. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), ); } diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 99c1bb43e17bfb43d32a9d541a56082fd46b6517..d49f53049c5ba06cf305b5911fff1010f37eab6a 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -25,7 +25,10 @@ function blogapi_help($path, $arg) { */ function blogapi_perm() { return array( - 'administer content with blog api' => t('Manage website content from external tools.'), + 'administer content with blog api' => array( + 'title' => t('Administer content with blog API'), + 'description' => t('Manage website content from external tools.'), + ), ); } diff --git a/modules/book/book.module b/modules/book/book.module index e739df143e6fba1ff01baa4cc4c3d37484cb8ea0..d5a2e4468747a7a041716b45ee7631e55d52dab8 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -41,10 +41,22 @@ function book_theme() { */ function book_perm() { return array( - 'administer book outlines' => t('Manage books through the administration panel.'), - 'create new books' => t('Add new top-level books.'), - 'add content to books' => t('Add new content and child pages to books.'), - 'access printer-friendly version' => t('View a book page and all of its sub-pages as a single document for ease of printing. Can be performance heavy.'), + 'administer book outlines' => array( + 'title' => t('Administer book outlines'), + 'description' => t('Manage books through the administration panel.'), + ), + 'create new books' => array( + 'title' => t('Create new books'), + 'description' => t('Add new top-level books.'), + ), + 'add content to books' => array( + 'title' => t('Add content to books'), + 'description' => t('Add new content and child pages to books.'), + ), + 'access printer-friendly version' => array( + 'title' => t('Access printer-friendly version'), + 'description' => t('View a book page and all of its sub-pages as a single document for ease of printing. Can be performance heavy.'), + ), ); } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4f3e6dff9fa35579af00124bae9e14873d9ff13b..cde48a9890ef1188a9be8b7f7cbb1a7e28d555a7 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -241,10 +241,22 @@ function comment_node_type($op, $info) { */ function comment_perm() { return array( - 'administer comments' => t('Manage and approve comments, and configure comment administration settings.'), - 'access comments' => t('View comments attached to content.'), - 'post comments' => t('Add comments to content (approval required).'), - 'post comments without approval' => t('Add comments to content (no approval required).'), + 'administer comments' => array( + 'title' => t('Administer comments'), + 'description' => t('Manage and approve comments, and configure comment administration settings.'), + ), + 'access comments' => array( + 'title' => t('Access comments'), + 'description' => t('View comments attached to content.'), + ), + 'post comments' => array( + 'title' => t('Post comments'), + 'description' => t('Add comments to content (approval required).'), + ), + 'post comments without approval' => array( + 'title' => t('Post comments without approval'), + 'description' => t('Add comments to content (no approval required).'), + ), ); } diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 4eb82043f378559bf029c09541a306ada1805d3a..9eee7558ac3d14e0dd2ef2e880ae2eae5c57e4df 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -37,8 +37,14 @@ function contact_help($path, $arg) { */ function contact_perm() { return array( - 'administer site-wide contact form' => t('Configure site-wide contact form administration settings.'), - 'access site-wide contact form' => t('Send feedback to administrators via e-mail using the site-wide contact form.'), + 'administer site-wide contact form' => array( + 'title' => t('Administer site-wide contact form'), + 'description' => t('Configure site-wide contact form administration settings.'), + ), + 'access site-wide contact form' => array( + 'title' => t('Access site-wide contact form'), + 'description' => t('Send feedback to administrators via e-mail using the site-wide contact form.'), + ), ); } diff --git a/modules/filter/filter.module b/modules/filter/filter.module index c35fc95672885c1b5de3a035c62f7f2d7dcccbad..64c5fc321a3d1cf79f154ed9ec55f3b032de90d8 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -146,7 +146,10 @@ function filter_admin_format_title($format) { */ function filter_perm() { return array( - 'administer filters' => t('Manage input formats and filters, and select which roles may use them. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + 'administer filters' => array( + 'title' => t('Administer filters'), + 'description' => t('Manage input formats and filters, and select which roles may use them. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), ); } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index e2bd329acdd072e14acd6cd584dd4dcf22757ffb..1ad242382c54940a15b35dc99c3f5278b5651a1f 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -382,7 +382,10 @@ function forum_access($op, $node, $account) { */ function forum_perm() { $perms = array( - 'administer forums' => t('Manage forums and configure forum administration settings.'), + 'administer forums' => array( + 'title' => t('Administer forums'), + 'description' => t('Manage forums and configure forum administration settings.'), + ), ); $perms += node_list_permissions('forum'); return $perms; diff --git a/modules/locale/locale.module b/modules/locale/locale.module index b48bb239fcfd846f346c0cab3bff11825376742e..12819724727655a8b16695185f4f010b33aec806 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -190,8 +190,14 @@ function locale_inc_callback() { */ function locale_perm() { return array( - 'administer languages' => t('Manage the languages in which the website content and interface text may be displayed.'), - 'translate interface' => t('Translate the text of the website interface.'), + 'administer languages' => array( + 'title' => t('Administer languages'), + 'description' => t('Manage the languages in which the website content and interface text may be displayed.'), + ), + 'translate interface' => array( + 'title' => t('Translate the interface'), + 'description' => t('Translate the text of the website interface.'), + ), ); } diff --git a/modules/menu/menu.module b/modules/menu/menu.module index f812785d592ddd48e758d35fb90c1f9c9e1c07cb..55dad4e7cea6d312fe3c199453d96bc152919a3d 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -38,7 +38,10 @@ function menu_help($path, $arg) { */ function menu_perm() { return array( - 'administer menu' => t('Manage menus and menu items.'), + 'administer menu' => array( + 'title' => t('Administer menu'), + 'description' => t('Manage menus and menu items.'), + ), ); } diff --git a/modules/node/node.module b/modules/node/node.module index 104c0f1c185683cebf36cb3b6e3f76eb5c98744c..0f8c5f9fd72831ba87b7b44ec6f47962984239be 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1170,12 +1170,30 @@ function theme_node_log_message($log) { */ function node_perm() { $perms = array( - 'administer content types' => t('Manage content types and content type administration settings.'), - 'administer nodes' => t('Manage all website content, and bypass any content-related access control. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), - 'access content' => t('View published content.'), - 'view revisions' => t('View content revisions.'), - 'revert revisions' => t('Replace content with an older revision.'), - 'delete revisions' => t('Delete content revisions.'), + 'administer content types' => array( + 'title' => t('Administer content types'), + 'description' => t('Manage content types and content type administration settings.'), + ), + 'administer nodes' => array( + 'title' => t('Administer nodes'), + 'description' => t('Manage all website content, and bypass any content-related access control. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), + 'access content' => array( + 'title' => t('Access content'), + 'description' => t('View published content.'), + ), + 'view revisions' => array( + 'title' => t('View revisions'), + 'description' => t('View content revisions.'), + ), + 'revert revisions' => array( + 'title' => t('Revert revisions'), + 'description' => t('Replace content with an older revision.'), + ), + 'delete revisions' => array( + 'title' => t('Delete revisions'), + 'description' => t('Delete content revisions.'), + ), ); foreach (node_get_types() as $type) { @@ -2874,11 +2892,28 @@ function node_list_permissions($type) { $type = check_plain($info->type); // Build standard list of node permissions for this type. - $perms["create $type content"] = t('Create new %type_name content.', array('%type_name' => $info->name)); - $perms["edit own $type content"] = t('Edit %type_name content created by the user.', array('%type_name' => $info->name)); - $perms["edit any $type content"] = t('Edit any %type_name content, regardless of its author.', array('%type_name' => $info->name)); - $perms["delete own $type content"] = t('Delete %type_name content created by the user.', array('%type_name' => $info->name)); - $perms["delete any $type content"] = t('Delete any %type_name content, regardless of its author.', array('%type_name' => $info->name)); + $perms = array( + "create $type content" => array( + 'title' => t('Create %type_name content', array('%type_name' => $info->name)), + 'description' => t('Create new %type_name content.', array('%type_name' => $info->name)), + ), + "edit own $type content" => array( + 'title' => t('Edit own %type_name content', array('%type_name' => $info->name)), + 'description' => t('Edit %type_name content created by the user.', array('%type_name' => $info->name)), + ), + "edit any $type content" => array( + 'title' => t('Edit any %type_name content', array('%type_name' => $info->name)), + 'description' => t('Edit any %type_name content, regardless of its author.', array('%type_name' => $info->name)), + ), + "delete own $type content" => array( + 'title' => t('Delete own %type_name content', array('%type_name' => $info->name)), + 'description' => t('Delete %type_name content created by the user.', array('%type_name' => $info->name)), + ), + "delete any $type content" => array( + 'title' => t('Delete any %type_name content', array('%type_name' => $info->name)), + 'description' => t('Delete any %type_name content, regardless of its author.', array('%type_name' => $info->name)), + ), + ); return $perms; } diff --git a/modules/path/path.module b/modules/path/path.module index 78933bcb512c34da101d0263e98c7d5e40316ddc..f4f2a006d8e2538e25ddec0d70c1b5aeedd88284 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -217,8 +217,14 @@ function path_form_alter(&$form, $form_state, $form_id) { */ function path_perm() { return array( - 'administer url aliases' => t('Manage URL aliases across the entire website.'), - 'create url aliases' => t('Manage URL aliases on content.'), + 'administer url aliases' => array( + 'title' => t('Administer URL aliases'), + 'description' => t('Manage URL aliases across the entire website.'), + ), + 'create url aliases' => array( + 'title' => t('Create URL aliases'), + 'description' => t('Manage URL aliases on content.'), + ), ); } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5d547549d6f15250a3740c7b305c8bbbccb097e8..5dd356f1bf5b78ad6e713c0b08f97dd7e95278ed 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -56,9 +56,18 @@ function poll_theme() { function poll_perm() { $perms = node_list_permissions('poll'); $perms += array( - 'vote on polls' => t('Cast votes on polls.'), - 'cancel own vote' => t('Retract and optionally change own votes.'), - 'inspect all votes' => t('View voting results.'), + 'vote on polls' => array( + 'title' => t('Vote on polls'), + 'description' => t('Cast votes on polls.'), + ), + 'cancel own vote' => array( + 'title' => t('Cancel own vote'), + 'description' => t('Retract and optionally change own votes.'), + ), + 'inspect all votes' => array( + 'title' => t('Inspect all votes'), + 'description' => t('View voting results.'), + ), ); return $perms; diff --git a/modules/search/search.module b/modules/search/search.module index 245c5ee339f031d8b3c66a0303618aa27fcd2188..e5ad72185b9ce2291ef2c77724cdb4d791357323 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -142,9 +142,18 @@ function search_theme() { */ function search_perm() { return array( - 'administer search' => t('Configure search administration settings.'), - 'search content' => t('Search website content.'), - 'use advanced search' => t('Limit search results with additional criteria, such as specific content types. Could have performance implications.'), + 'administer search' => array( + 'title' => t('Administer search'), + 'description' => t('Configure search administration settings.'), + ), + 'search content' => array( + 'title' => t('Search content'), + 'description' => t('Search website content.'), + ), + 'use advanced search' => array( + 'title' => t('Use advanced search'), + 'description' => t('Limit search results with additional criteria, such as specific content types. Could have performance implications.'), + ), ); } diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module index 8ef584ca4679187c0c73cec2d3b14fad06ff7db9..1cc8e0bd99c17bc0988f1f557b2f97b683f48ae3 100644 --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -35,7 +35,10 @@ function simpletest_menu() { */ function simpletest_perm() { return array( - 'administer unit tests' => t('Manage and run automated testing. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + 'administer unit tests' => array( + 'title' => t('Administer unit tests'), + 'description' => t('Manage and run automated testing. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), ); } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index b830b20fd0249874c919c1b067b3f9753194d58a..2bafc54bf441560480a337dfc5629ecd431460ab 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -84,8 +84,14 @@ function statistics_exit() { */ function statistics_perm() { return array( - 'access statistics' => t('View content access statistics.'), - 'view post access counter' => t('View the total number of times a piece of content has been accessed.'), + 'access statistics' => array( + 'title' => t('Access statistics'), + 'description' => t('View content access statistics.'), + ), + 'view post access counter' => array( + 'title' => t('View post access counter'), + 'description' => t('View the total number of times a piece of content has been accessed.'), + ), ); } diff --git a/modules/system/system.module b/modules/system/system.module index 8f533b20f8e34da0f790dd1333c488e351ebfdfd..2ccdbc01ad0e547b7ef84468fa0a9601f00c5b50 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -165,13 +165,34 @@ function system_theme() { */ function system_perm() { return array( - 'administer site configuration' => t('Configure site-wide settings such as module or theme administration settings.'), - 'administer actions' => t('Manage the actions defined for your site.'), - 'administer files' => t('Manage user-uploaded files.'), - 'access administration pages' => t('View the administration panel and browse the help system.'), - 'access site reports' => t('View reports from system logs and other status information.'), - 'select different theme' => t('Select a theme other than the default theme set by the site administrator.'), - 'block IP addresses' => t('Block IP addresses from accessing your site.'), + 'administer site configuration' => array( + 'title' => t('Administer site configuration'), + 'description' => t('Configure site-wide settings such as module or theme administration settings.'), + ), + 'administer actions' => array( + 'title' => t('Administer actions'), + 'description' => t('Manage the actions defined for your site.'), + ), + 'administer files' => array( + 'title' => t('Administer files'), + 'description' => t('Manage user-uploaded files.'), + ), + 'access administration pages' => array( + 'title' => t('Access administration pages'), + 'description' => t('View the administration panel and browse the help system.'), + ), + 'access site reports' => array( + 'title' => t('Access site reports'), + 'description' => t('View reports from system logs and other status information.'), + ), + 'select different theme' => array( + 'title' => t('Select different theme'), + 'description' => t('Select a theme other than the default theme set by the site administrator.'), + ), + 'block IP addresses' => array( + 'title' => t('Block IP addresses'), + 'description' => t('Block IP addresses from accessing your site.'), + ), ); } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 97ab280e355abdf8dbb2f2cb689bb09b185c9aa3..03cee16a45b1008d05527a7550115ae6f08d7c6d 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -11,7 +11,10 @@ */ function taxonomy_perm() { return array( - 'administer taxonomy' => t('Manage taxonomy vocabularies and terms.'), + 'administer taxonomy' => array( + 'title' => t('Administer taxonomy'), + 'description' => t('Manage taxonomy vocabularies and terms.'), + ), ); } diff --git a/modules/translation/translation.module b/modules/translation/translation.module index 0f79c00e0eb115cb378f78668964e51483bc2663..04401aed188196cbc080610f02bb1c6b4c965a01 100644 --- a/modules/translation/translation.module +++ b/modules/translation/translation.module @@ -86,7 +86,10 @@ function _translation_tab_access($node) { */ function translation_perm() { return array( - 'translate content' => t('Translate website content.'), + 'translate content' => array( + 'title' => t('Tranlate content'), + 'description' => t('Translate website content.'), + ), ); } diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 3e4049f637d5b8a44e6f82fb7f4da2f8fb2ce90c..0c8e792275eb61898820750589d299e99d7ccfdb 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -44,8 +44,14 @@ function upload_theme() { */ function upload_perm() { return array( - 'upload files' => t('Attach images and other files to content.'), - 'view uploaded files' => t('View and download files attached to content.'), + 'upload files' => array( + 'title' => t('Upload files'), + 'description' => t('Attach images and other files to content.'), + ), + 'view uploaded files' => array( + 'title' => t('View uploaded files'), + 'description' => t('View and download files attached to content.'), + ), ); } diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index 9260da77f6c445836b5bb5a4d82dcf2589a854de..84a1c79c26a1e93c05a96afbbe6a18ea56c85f76 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -514,18 +514,13 @@ function user_admin_perm($form_state, $rid = NULL) { if ($permissions = module_invoke($module, 'perm')) { $form['permission'][] = array( '#markup' => $module, - ); - foreach ($permissions as $perm => $description) { - // Account for permissions lacking a description. - if (is_int($perm)) { - $perm = $description; - $description = NULL; - } + ); + foreach ($permissions as $perm => $perm_item) { $options[$perm] = ''; $form['permission'][$perm] = array( '#type' => 'item', - '#markup' => t($perm), - '#description' => $hide_descriptions ? $description : NULL, + '#markup' => $perm_item['title'], + '#description' => $hide_descriptions ? $perm_item['description'] : NULL, ); foreach ($role_names as $rid => $name) { // Builds arrays for checked boxes for each role diff --git a/modules/user/user.module b/modules/user/user.module index e8d956d0fb8f41aa0f0d08e83361285fb2b021a4..ee189ff58b3d3ea62809fd3306931ba2366b77fc 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -571,10 +571,22 @@ function user_is_blocked($name) { */ function user_perm() { return array( - 'administer permissions' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), - 'administer users' => t('Manage or block users, and manage their role assignments.'), - 'access user profiles' => t('View profiles of users on the site, which may contain personal information.'), - 'change own username' => t('Select a different username.'), + 'administer permissions' => array( + 'title' => t('Administer permissions'), + 'description' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), + 'administer users' => array( + 'title' => t('Administer users'), + 'description' => t('Manage or block users, and manage their role assignments.'), + ), + 'access user profiles' => array( + 'title' => t('Access user profiles'), + 'description' => t('View profiles of users on the site, which may contain personal information.'), + ), + 'change own username' => array( + 'title' => t('Change own username'), + 'description' => t('Select a different username.'), + ), ); }