summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2009-01-21 01:11:36 (GMT)
committer Joao Ventura2009-01-21 01:11:36 (GMT)
commit149e2ffa89f0d64db53cbab53796ccbd0f78aedd (patch)
tree0496b28e243d8d2d51f65ff28d06d204301798f4
parent689b11f5aacb51075f21c6d3bf003456ecd00af7 (diff)
Coder fixes
Fix #361107: Ensure that per-node configurations are available for block view use Revert #349991 until the cause of #359343 can be determined
-rw-r--r--print.admin.inc2
-rw-r--r--print.install2
-rw-r--r--print.module54
-rw-r--r--print.pages.inc5
-rw-r--r--print_mail/print_mail.module5
-rw-r--r--print_pdf/print_pdf.module5
6 files changed, 6 insertions, 67 deletions
diff --git a/print.admin.inc b/print.admin.inc
index 40b445a..2f49664 100644
--- a/print.admin.inc
+++ b/print.admin.inc
@@ -35,7 +35,7 @@ function print_main_settings() {
'#title' => t('Printer-friendly URLs list'),
'#default_value' => variable_get('print_urls', PRINT_URLS_DEFAULT),
'#description' => t('If set, a list of the destination URLs for the page links will be displayed at the bottom of the page.') .'<br />'.
- t('Note that you can enable/disable the URL list for each content type individually from the !url.', array('!url' => l(t('Content Types page'),'admin/content/types'))),
+ t('Note that you can enable/disable the URL list for each content type individually from the !url.', array('!url' => l(t('Content Types page'), 'admin/content/types'))),
);
$form['settings']['print_comments'] = array(
diff --git a/print.install b/print.install
index 883bfbd..db49e6f 100644
--- a/print.install
+++ b/print.install
@@ -46,7 +46,7 @@ function print_install() {
$t = get_t();
drupal_set_message($t('Printer-friendly Page settings are available under !link',
- array( '!link' => l('Administer > Site configuration > Printer-friendly Pages ', 'admin/settings/print' ) )
+ array( '!link' => l($t('Administer > Site configuration > Printer-friendly Pages'), 'admin/settings/print' ) )
));
}
diff --git a/print.module b/print.module
index 8189271..c6181ad 100644
--- a/print.module
+++ b/print.module
@@ -259,9 +259,6 @@ function print_nodeapi(&$node, $op = 'view', $teaser, $page) {
switch ($op) {
case 'view':
// Insert content corner links
- if ($teaser === FALSE) {
- _print_set_node_fields($node);
- }
$print_html_link_pos = variable_get('print_html_link_pos', array(PRINT_HTML_LINK_POS_DEFAULT => PRINT_HTML_LINK_POS_DEFAULT));
if (($teaser === FALSE) && !empty($print_html_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
@@ -274,7 +271,7 @@ function print_nodeapi(&$node, $op = 'view', $teaser, $page) {
}
}
break;
- case 'prepare':
+ case 'load':
_print_set_node_fields($node);
break;
case 'update':
@@ -727,52 +724,3 @@ function print_query_string_encode($query, $exclude = array(), $parent = '') {
return implode('&', $params);
}
-
-/**
- * Implementation of hook_content_build_modes()
- *
- * @return
- * An array describing the build modes used by the module.
- * They are grouped by secondary tabs on CCK's 'Display fields' screens.
- *
- * Expected format:
- * array(
- * // The first level keys (tab1_url, tab2_url) will be used to generate
- * // the url of the tab: admin/content/node-type/[type_name]/display/[tab1_url]
- * // A module can add its render modes to a tab defined by another module.
- * // In this case, there's no need to provide a 'title' for this tab.
- * 'tab1_url' => array(
- * 'title' => t('The human-readable title of the tab'),
- * 'build modes' => array(
- * // The keys of the 'context' array are the values used in $node->build_mode.
- * 'mymodule_mode1' => array(
- * 'title' => t('The human-readable name of the build mode'),
- * // The 'views style' property determines if the render mode should be
- * // available as an option in Views' 'node' row style (not implemented yet).
- * 'views style' => TRUE,
- * ),
- * 'mymodule_mode2' => array(
- * 'title' => t('Mode 2'),
- * 'views style' => TRUE,
- * ),
- * ),
- * ),
- * 'tab2_url' => array(
- * // ...
- * ),
- * );
- */
-function print_content_build_modes() {
- return array(
- 'print' => array(
- 'title' => t('Print'),
- 'build modes' => array(
- 'print' => array(
- 'title' => t('Print'),
- 'views style' => FALSE,
- ),
- ),
- ),
- );
-}
-
diff --git a/print.pages.inc b/print.pages.inc
index 27243e2..0fdb84c 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -554,11 +554,8 @@ function _print_generate_node($nid, $cid = NULL, $format = PRINT_HTML_FORMAT, $t
drupal_set_title($node->title);
//alert other modules that we are generating a printer-friendly page, so they can choose to show/hide info
- // TODO: Remove this in favor of PRINT_BUILD_MODE
$node->printing = TRUE;
-
- $node->build_mode = 'print';
-
+
// Turn off Pagination by the Paging module
unset($node->pages);
unset($node->pages_count);
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 903a9a0..d3e69d7 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -166,9 +166,6 @@ function print_mail_nodeapi(&$node, $op = 'view', $teaser, $page) {
switch ($op) {
case 'view':
// Insert content corner links
- if ($teaser === FALSE) {
- _print_mail_set_node_fields($node);
- }
$print_mail_link_pos = variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT));
if (($teaser === FALSE) && !empty($print_mail_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
@@ -181,7 +178,7 @@ function print_mail_nodeapi(&$node, $op = 'view', $teaser, $page) {
}
}
break;
- case 'prepare':
+ case 'load':
_print_mail_set_node_fields($node);
break;
case 'update':
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index 7cde9af..bd647d6 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -192,9 +192,6 @@ function print_pdf_nodeapi(&$node, $op = 'view', $teaser, $page) {
switch ($op) {
case 'view':
// Insert content corner links
- if ($teaser === FALSE) {
- _print_pdf_set_node_fields($node);
- }
$print_pdf_link_pos = variable_get('print_pdf_link_pos', array(PRINT_PDF_LINK_POS_DEFAULT => PRINT_PDF_LINK_POS_DEFAULT));
if (($teaser === FALSE) && !empty($print_pdf_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
@@ -207,7 +204,7 @@ function print_pdf_nodeapi(&$node, $op = 'view', $teaser, $page) {
}
}
break;
- case 'prepare':
+ case 'load':
_print_pdf_set_node_fields($node);
break;
case 'update':