Commit 5407b630 authored by Dries's avatar Dries

- Orphaned the node_link() hook as per #9769.

parent e769215e
......@@ -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 = '<h3>'. t('Edit comments') .'</h3>';
$output .= theme('table', $header, $rows);
}
return $output;
}
}
/**
* Implementation of hook_search().
*
......
......@@ -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 = '<h3>'. t('Edit comments') .'</h3>';
$output .= theme('table', $header, $rows);
}
return $output;
}
}
/**
* Implementation of hook_search().
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment