? comment_perm_d6.patch Index: comment_perm.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/comment_perm/comment_perm.info,v retrieving revision 1.1 diff -u -p -r1.1 comment_perm.info --- comment_perm.info 4 Oct 2008 00:04:12 -0000 1.1 +++ comment_perm.info 6 Apr 2009 20:14:45 -0000 @@ -1,4 +1,5 @@ ; $Id: name = Comment Permissions description = Control commenting permissions by role AND by node type. -dependencies = comment \ No newline at end of file +dependencies[] = comment +core = 6.x \ No newline at end of file Index: comment_perm.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/comment_perm/comment_perm.module,v retrieving revision 1.1 diff -u -p -r1.1 comment_perm.module --- comment_perm.module 4 Oct 2008 00:04:12 -0000 1.1 +++ comment_perm.module 6 Apr 2009 20:14:45 -0000 @@ -4,20 +4,18 @@ /** * Implementation of hook_menu(). */ -function comment_perm_menu($may_cache) { +function comment_perm_menu() { $items = array(); - if ($may_cache) { - $items[] = array( - 'path' => 'admin/content/comment_perm', - 'title' => t('Comment permissions'), - 'description' => t('Setup comment permissions by user role and by node type.'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'comment_perm_admin_settings', - 'access' => user_access('administer site configuration'), - 'type' => MENU_NORMAL_ITEM - ); - } + $items['admin/content/comment_perm'] = array( + 'title' => 'Comment permissions', + 'description' => 'Setup comment permissions by user role and by node type.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('comment_perm_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); + return $items; } @@ -27,10 +25,12 @@ function comment_perm_menu($may_cache) { function comment_perm_admin_settings() { $form = array(); $form['help'] = array( - '#value' => t("

Enable the extended comment permissions for certain content types here. - Then go to the !user-access-control to configure which roles can post comments for the - these content types.

", - array('!user-access-control' => l('user access control', 'admin/user/access'))) + '#prefix' => '

', + '#value' => t('Enable the extended comment permissions for certain content types here. + Then go to the !administer_permissions to configure which roles can post comments for the + these content types.', + array('!administer_permissions' => l('administer permissions', 'admin/user/permissions'))), + '#suffix' => '

' ); // get node types @@ -108,7 +108,7 @@ function comment_perm_comment($a1, $op) /** * Implementation of hook_form_alter(). */ -function comment_perm_form_alter($form_id, &$form) { +function comment_perm_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'comment_form') { $nid = $form['nid']['#value']; if (!comment_perm_access($nid)) { @@ -146,9 +146,13 @@ function comment_perm_form_alter($form_i /** * Implementation of hook_link_alter(). */ -function comment_perm_link_alter(&$node, &$links) { +function comment_perm_link_alter(&$links, $node) { if (!comment_perm_access($node)) { unset($links['comment_add']); + + if (module_exists('quote')) { + unset($links['quote']); + } } } @@ -180,4 +184,4 @@ function _comment_perm_access_denied_mes } else { return variable_get('comment_perm_message_reg', "We're sorry, but you can't post comments here!"); } -} +} \ No newline at end of file