Closed (fixed)
Project:
Forum Thread
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Dec 2008 at 01:53 UTC
Updated:
16 Mar 2010 at 06:10 UTC
Jump to comment: Most recent file
From #321295: Errors when other modules incorrectly implement link_alter I did a search for modules that incorrectly implement link_alter. forumthread is one of the offenders. The docs for hook_link_alter say that the function should be passed $links, then $node (a reversal from D5). Your implementation currently passes the parameters in reverse:
$links = module_invoke_all('link', 'comment', $comment, 1);
foreach (module_implements('link_alter') as $module) {
$function = $module .'_link_alter';
$function($node, $links);
}
Should be
$links = module_invoke_all('link', 'comment', $comment, 1);
drupal_alter('link', $links, $node);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | forumthread-link-alter-D6.patch | 880 bytes | dave reid |
Comments
Comment #1
dave reidPatch included for your review.
Comment #2
jbrauer commentedThanks Dave. I'll get that addressed!
Comment #3
dave reidThanks very much JBrauer!
Comment #4
dave reidAny progress on this?
Comment #5
jbrauer commentedThanks Dave looks good... it's in -dev
Comment #6
jbrauer commentedCommitted long ago now.