I see that the last commited change was '#145458 nicholasThompson's patch to fix the hook_links implementation.', however it needs an additional attribute to 'fix' the hook_links func:
Change:
function upload_image_link($type, $node = 0, $main = 0) {
$links = array();
// Display a link with the number of attachments
if ($type == 'node' && $node->type == 'image') {
$image = db_fetch_object(db_query('SELECT u.oid, n.title, n.uid FROM {upload_images} u INNER JOIN {node} n ON u.oid = n.nid WHERE u.nid = %d', $node->nid));
if ($image->oid) {
$links['upload_image_link'] = array(
'title' => t('parent post: %title', array('%title' => check_plain($image->title))),
'href' => 'node/'. $image->oid,
'attributes' => array('title' => t('Read parent post to view all attached images.'))
);
}
}
return $links;
}
to
function upload_image_link($type, $node = 0, $main = 0) {
$links = array();
// Display a link with the number of attachments
if ($type == 'node' && $node->type == 'image') {
$image = db_fetch_object(db_query('SELECT u.oid, n.title, n.uid FROM {upload_images} u INNER JOIN {node} n ON u.oid = n.nid WHERE u.nid = %d', $node->nid));
if ($image->oid) {
$links['upload_image_link'] = array(
'title' => t('parent post: %title', array('%title' => check_plain($image->title))),
'href' => 'node/'. $image->oid,
'attributes' => array('title' => t('Read parent post to view all attached images.')),
'html'=>TRUE
);
}
}
return $links;
}
ie, add a HTML key set to true, otherwise the link displays as parent post:<em>Title</em>
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | upload_image_153391.patch | 819 bytes | drewish |
Comments
Comment #1
drewish commentedit's unclear to me what is changing here... could you provide a patch? http://drupal.org/patch/create
Comment #2
Papayoung commentedI had the same problem, same fix. Haven't yet figured out how to roll a patch, but line 18 (in v1.17.2.3) goes from
to
Comment #3
drewish commentedcommitting the attached to HEAD and DRUPAL-5
Comment #4
(not verified) commented