hook_link_alter() in D6 can be used for nodes and for comments.
hook_link_alter(&$links, $node, $comment = NULL)

Have a look at comment.module, function comment_render() in D6
(I don't want to give line numbers, they could change with the Drupal build).

<?php
        $links = module_invoke_all('link', 'comment', $comment, 1);
        drupal_alter('link', $links, $node, $comment);
?>

And now in advanced_forum.module, function advanced_forum_preprocess_comment()

<?php
      $links = module_invoke_all('link', 'comment', $variables['comment']);
      drupal_alter('link', $links, $node);
?>

Correct would be

<?php
      $links = module_invoke_all('link', 'comment', $variables['comment']);
      drupal_alter('link', $links, $node, $variables['comment']);
?>

------

Why is this relevant?

Because in my implementation of hook_link_alter(), I want to check whether I'm dealing with a comment or a node.
I need hook_link_alter(), because it is the only comment hook that has $node as a parameter in addition to $comment, so I can check for $node->type.

Comments

michelle’s picture

Category: bug » support
Status: Active » Closed (won't fix)

This code no longer exists so nothing to do here.

Michelle

donquixote’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Closed (won't fix) » Active

Then could we fix it on the 1.x branch? It's just a tiny and obvious fix...
Thanks.

mr.j’s picture

++ It contributes to this bug in ajax comments which I believe won't work with 2.x anyway.

michelle’s picture

Status: Active » Fixed

Committed, thanks. :)

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.