summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2009-08-20 01:02:02 (GMT)
committer Joao Ventura2009-08-20 01:02:02 (GMT)
commit45074750e6f028401cca7469685f063db47f7b1e (patch)
tree4488c81a4ab2d963e7f6b8e2da9242ceb4ef32f6
parent195deb4a63b0d3b944467544deb0d0d2616be680 (diff)
Fix #544890 by dereine: use node_load with nid only to allow caching
-rw-r--r--print.module4
-rw-r--r--print.pages.inc4
-rw-r--r--print_mail/print_mail.module2
-rw-r--r--print_pdf/print_pdf.module2
4 files changed, 6 insertions, 6 deletions
diff --git a/print.module b/print.module
index 10adca5..a08d29c 100644
--- a/print.module
+++ b/print.module
@@ -179,7 +179,7 @@ function print_block($op = 'list', $delta = 0, $edit = array()) {
case 0:
$nid = preg_replace('!^node/!', '', $_GET['q']);
if (is_numeric($nid)) {
- $node = node_load(array('nid' => $nid));
+ $node = node_load($nid);
}
else {
$node = NULL;
@@ -701,7 +701,7 @@ function print_link_allowed($args) {
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
if (is_numeric($nid)) {
- $args['node'] = node_load(array('nid' => $nid));
+ $args['node'] = node_load($nid);
}
}
if (!empty($args['node'])) {
diff --git a/print.pages.inc b/print.pages.inc
index 060b190..2fba0f8 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -547,7 +547,7 @@ function _print_generate_node($nid, $cid = NULL, $format = PRINT_HTML_FORMAT, $t
global $_print_urls;
// We can take a node id
- $node = node_load(array('nid' => $nid));
+ $node = node_load($nid);
if (!$node) {
// Node not found
drupal_not_found();
@@ -732,7 +732,7 @@ function _print_generate_path($path, $format = PRINT_HTML_FORMAT, $teaser = FALS
function _print_generate_book($nid, $format = PRINT_HTML_FORMAT, $teaser = FALSE, $message = NULL) {
global $_print_urls;
- $node = node_load(array('nid' => $nid));
+ $node = node_load($nid);
if (!$node) {
// Node not found
drupal_not_found();
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index c3d070a..38a00a4 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -441,7 +441,7 @@ function print_mail_link_allowed($args) {
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
if (is_numeric($nid)) {
- $args['node'] = node_load(array('nid' => $nid));
+ $args['node'] = node_load($nid);
}
}
if (!empty($args['node'])) {
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index 0d3b3e4..88774c7 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -433,7 +433,7 @@ function print_pdf_link_allowed($args) {
if (!empty($args['path'])) {
$nid = preg_replace('!^node/!', '', drupal_get_normal_path($args['path']));
if (is_numeric($nid)) {
- $args['node'] = node_load(array('nid' => $nid));
+ $args['node'] = node_load($nid);
}
}
if (!empty($args['node'])) {