From 5407b630e3ec610e51099202dc5c73501ea33991 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 10 Oct 2004 11:12:57 +0000 Subject: [PATCH] - Orphaned the node_link() hook as per #9769. --- modules/comment.module | 26 -------------------------- modules/comment/comment.module | 26 -------------------------- 2 files changed, 52 deletions(-) diff --git a/modules/comment.module b/modules/comment.module index 25b00c4519a..10ebec9476f 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -262,32 +262,6 @@ function comment_nodeapi(&$node, $op, $arg = 0) { } } -/** - * Implementation of hook_node_link(). - * - * Allows users with appropriate privileges to edit comments when viewing - * a node. - */ -function comment_node_link($node) { - if (user_access('administer comments')) { - $result = db_query('SELECT c.cid, c.subject, c.name, c.homepage, u.uid, u.name AS registered_name, c.name FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE nid = %d AND c.status = 0 ORDER BY c.timestamp', $node->nid); - - $header = array(t('Title'), t('Author'), array('data' => t('Operations'), 'colspan' => 3)); - - while ($comment = db_fetch_object($result)) { - $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name; - $rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit'), "admin/comment/edit/$comment->cid"), l(t('delete'), "admin/comment/delete/$comment->cid")); - } - - if ($rows) { - $output = '

'. t('Edit comments') .'

'; - $output .= theme('table', $header, $rows); - } - - return $output; - } -} - /** * Implementation of hook_search(). * diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 25b00c4519a..10ebec9476f 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -262,32 +262,6 @@ function comment_nodeapi(&$node, $op, $arg = 0) { } } -/** - * Implementation of hook_node_link(). - * - * Allows users with appropriate privileges to edit comments when viewing - * a node. - */ -function comment_node_link($node) { - if (user_access('administer comments')) { - $result = db_query('SELECT c.cid, c.subject, c.name, c.homepage, u.uid, u.name AS registered_name, c.name FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE nid = %d AND c.status = 0 ORDER BY c.timestamp', $node->nid); - - $header = array(t('Title'), t('Author'), array('data' => t('Operations'), 'colspan' => 3)); - - while ($comment = db_fetch_object($result)) { - $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name; - $rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit'), "admin/comment/edit/$comment->cid"), l(t('delete'), "admin/comment/delete/$comment->cid")); - } - - if ($rows) { - $output = '

'. t('Edit comments') .'

'; - $output .= theme('table', $header, $rows); - } - - return $output; - } -} - /** * Implementation of hook_search(). *