Commit dd30da23 authored by jcnventura's avatar jcnventura

Move things around a bit

parent 781f5674
......@@ -104,26 +104,6 @@ function print_mail_block_view($delta = 0) {
return $block;
}
/**
* Implementation of hook_help().
*/
function print_mail_help($path, $arg) {
$print_mail_link_pos = variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT));
if ((preg_match('!^node/!i', $path) == 0) &&
!(empty($print_mail_link_pos['link']) && empty($print_mail_link_pos['corner']))) {
static $output = FALSE;
if ($output === FALSE) {
$output = TRUE;
$link = print_mail_insert_link();
if ($link) {
return "<span class='print-syslink'>$link</span>";
}
}
}
}
/**
* Implementation of hook_nodeapi_view().
*/
......@@ -173,17 +153,37 @@ function print_mail_nodeapi_view($node, $teaser) {
);
}
// Insert content corner links
if (($teaser === FALSE) && !empty($print_mail_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
$link = print_mail_insert_link(NULL, $node);
if ($link) {
$node->content['print_mail_link'] = array(
'#markup' => "<span class='print-link'>$link</span>",
'#weight' => -102,
);
}
// Insert content corner links
if (($teaser === FALSE) && !empty($print_mail_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
$link = print_mail_insert_link(NULL, $node);
if ($link) {
$node->content['print_mail_link'] = array(
'#markup' => "<span class='print-link'>$link</span>",
'#weight' => -102,
);
}
}
}
/**
* Implementation of hook_help().
*/
function print_mail_help($path, $arg) {
$print_mail_link_pos = variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT));
if ((preg_match('!^node/!i', $path) == 0) &&
!(empty($print_mail_link_pos['link']) && empty($print_mail_link_pos['corner']))) {
static $output = FALSE;
if ($output === FALSE) {
$output = TRUE;
$link = print_mail_insert_link();
if ($link) {
return "<span class='print-syslink'>$link</span>";
}
}
}
}
/**
......
......@@ -145,26 +145,6 @@ function print_pdf_requirements($phase) {
return $requirements;
}
/**
* Implementation of hook_help().
*/
function print_pdf_help($path, $arg) {
$print_pdf_link_pos = variable_get('print_pdf_link_pos', array(PRINT_PDF_LINK_POS_DEFAULT => PRINT_PDF_LINK_POS_DEFAULT));
if ((preg_match('!^node/!i', $path) == 0) &&
!(empty($print_pdf_link_pos['link']) && empty($print_pdf_link_pos['corner']))) {
static $output = FALSE;
if ($output === FALSE) {
$output = TRUE;
$link = print_pdf_insert_link();
if ($link) {
return "<span class='print-syslink'>$link</span>";
}
}
}
}
/**
* Implementation of hook_nodeapi_view().
*/
......@@ -213,17 +193,37 @@ function print_pdf_nodeapi_view($node, $teaser) {
);
}
// Insert content corner links
if (($teaser === FALSE) && !empty($print_pdf_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
$link = print_pdf_insert_link(NULL, $node);
if ($link) {
$node->content['print_pdf_link'] = array(
'#markup' => "<span class='print-link'>$link</span>",
'#weight' => -103,
);
}
// Insert content corner links
if (($teaser === FALSE) && !empty($print_pdf_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
$link = print_pdf_insert_link(NULL, $node);
if ($link) {
$node->content['print_pdf_link'] = array(
'#markup' => "<span class='print-link'>$link</span>",
'#weight' => -103,
);
}
}
}
/**
* Implementation of hook_help().
*/
function print_pdf_help($path, $arg) {
$print_pdf_link_pos = variable_get('print_pdf_link_pos', array(PRINT_PDF_LINK_POS_DEFAULT => PRINT_PDF_LINK_POS_DEFAULT));
if ((preg_match('!^node/!i', $path) == 0) &&
!(empty($print_pdf_link_pos['link']) && empty($print_pdf_link_pos['corner']))) {
static $output = FALSE;
if ($output === FALSE) {
$output = TRUE;
$link = print_pdf_insert_link();
if ($link) {
return "<span class='print-syslink'>$link</span>";
}
}
}
}
/**
......
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