diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-02-20 13:46:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-02-20 13:46:43 +0000 |
commit | 584f3e886a7c9850d53fedaab2c8f3d0249bda10 (patch) | |
tree | 8a089ab394e25f3703e9e47912ca242e0550be5d /modules/blog/blog.module | |
parent | 8e0d6b4690866b3dd39bd4128e9845d9fb79b6fc (diff) | |
download | brdo-584f3e886a7c9850d53fedaab2c8f3d0249bda10.tar.gz brdo-584f3e886a7c9850d53fedaab2c8f3d0249bda10.tar.bz2 |
- Patch #30984 by webchick, keith.smith, kkaefer, Crell et al: provide descriptions for permissions on the permission administration page.
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r-- | modules/blog/blog.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 2a757cfec..172f6833d 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -23,7 +23,7 @@ function blog_node_info() { * Implementation of hook_perm(). */ function blog_perm() { - return array('create blog entries', 'delete own blog entries', 'delete any blog entry', 'edit own blog entries', 'edit any blog entry'); + return node_list_permissions('blog'); } /** @@ -33,11 +33,11 @@ function blog_access($op, $node, $account) { switch ($op) { case 'create': // Anonymous users cannot post even if they have the permission. - return user_access('create blog entries', $account) && $account->uid; + return user_access('create blog content', $account) && $account->uid; case 'update': - return user_access('edit any blog entry', $account) || (user_access('edit own blog entries', $account) && ($node->uid == $account->uid)); + return user_access('edit any blog content', $account) || (user_access('edit own blog content', $account) && ($node->uid == $account->uid)); case 'delete': - return user_access('delete any blog entry', $account) || (user_access('delete own blog entries', $account) && ($node->uid == $account->uid)); + return user_access('delete any blog content', $account) || (user_access('delete own blog content', $account) && ($node->uid == $account->uid)); } } @@ -45,7 +45,7 @@ function blog_access($op, $node, $account) { * Implementation of hook_user(). */ function blog_user($type, &$edit, &$user) { - if ($type == 'view' && user_access('create blog entries', $user)) { + if ($type == 'view' && user_access('create blog content', $user)) { $user->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), @@ -145,7 +145,7 @@ function blog_menu() { 'page callback' => 'blog_page_user', 'page arguments' => array(1), 'access callback' => 'user_access', - 'access arguments' => array('create blog entries', 1), + 'access arguments' => array('create blog content', 1), 'file' => 'blog.pages.inc', ); $items['blog/%user/feed'] = array( |