Closed (fixed)
Project:
Pdfview
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2006 at 11:59 UTC
Updated:
24 Aug 2006 at 12:25 UTC
Hi,
pdfview_links is exporting an array, when it should be exporting a link. So, when you view a page, where usually you'd see a 'download PDF' link, it just says 'Array'.
I haven't mastered the art of patches yet ;) so here's the code
function pdfview_link($type, $node = 0, $main) {
$links = array();
if ($type == 'node' && $main == 0) {
if (user_access('access content as PDF') && variable_get('pdfview_'.$node->type, 1)) {
$links['pdfview_link'] = l(t('download PDF'), 'node/'.$node->nid.'/pdf', array('title' => t('Display a PDF version of this page.') ));
}
}
return $links;
}
Cheers
Comments
Comment #1
Egon Bianchet commentedThe cvs version is compatible with Drupal head/4.8, you should download the 4.7