summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print.module12
-rw-r--r--print_mail/print_mail.module12
-rw-r--r--print_pdf/print_pdf.module12
3 files changed, 27 insertions, 9 deletions
diff --git a/print.module b/print.module
index f9e8d79..79d812a 100644
--- a/print.module
+++ b/print.module
@@ -446,9 +446,15 @@ function print_nodeapi(&$node, $op = 'view', $teaser, $page) {
case 'insert':
case 'update':
if (user_access('administer print') || user_access('node-specific print configuration')) {
- if ($node->print_display === NULL) $node->print_display = variable_get('print_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
- if ($node->print_display_comment === NULL) $node->print_display_comment = variable_get('print_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
- if ($node->print_display_urllist === NULL) $node->print_display_urllist = variable_get('print_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ if (!isset($node->print_display) || ($node->print_display === NULL)) {
+ $node->print_display = variable_get('print_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
+ }
+ if (!isset($node->print_display_comment) || ($node->print_display_comment === NULL)) {
+ $node->print_display_comment = variable_get('print_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
+ }
+ if (!isset($node->print_display_urllist) || ($node->print_display_urllist === NULL)) {
+ $node->print_display_urllist = variable_get('print_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ }
_print_node_conf_modify($node->nid, $node->print_display, $node->print_display_comment, $node->print_display_urllist);
}
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 7f21a54..ea8d87a 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -217,9 +217,15 @@ function print_mail_nodeapi(&$node, $op = 'view', $teaser, $page) {
case 'insert':
case 'update':
if (user_access('administer print') || user_access('node-specific print configuration')) {
- if ($node->print_mail_display === NULL) $node->print_mail_display = variable_get('print_mail_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
- if ($node->print_mail_display_comment === NULL) $node->print_mail_display_comment = variable_get('print_mail_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
- if ($node->print_mail_display_urllist === NULL) $node->print_mail_display_urllist = variable_get('print_mail_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ if (!isset($node->print_mail_display) || ($node->print_mail_display === NULL)) {
+ $node->print_mail_display = variable_get('print_mail_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
+ }
+ if (!isset($node->print_mail_display_comment) || ($node->print_mail_display_comment === NULL)) {
+ $node->print_mail_display_comment = variable_get('print_mail_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
+ }
+ if (!isset($node->print_mail_display_urllist) || ($node->print_mail_display_urllist === NULL)) {
+ $node->print_mail_display_urllist = variable_get('print_mail_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ }
_print_mail_node_conf_modify($node->nid, $node->print_mail_display, $node->print_mail_display_comment, $node->print_mail_display_urllist);
}
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index f5e00fb..d2ce3a4 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -333,9 +333,15 @@ function print_pdf_nodeapi(&$node, $op = 'view', $teaser, $page) {
case 'insert':
case 'update':
if (user_access('administer print') || user_access('node-specific print configuration')) {
- if ($node->print_pdf_display === NULL) $node->print_pdf_display = variable_get('print_pdf_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
- if ($node->print_pdf_display_comment === NULL) $node->print_pdf_display_comment = variable_get('print_pdf_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
- if ($node->print_pdf_display_urllist === NULL) $node->print_pdf_display_urllist = variable_get('print_pdf_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ if (!isset($node->print_pdf_display) || ($node->print_pdf_display === NULL)) {
+ $node->print_pdf_display = variable_get('print_pdf_display_'. $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
+ }
+ if (!isset($node->print_pdf_display_comment) || ($node->print_pdf_display_comment === NULL)) {
+ $node->print_pdf_display_comment = variable_get('print_pdf_display_comment_'. $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
+ }
+ if (!isset($node->print_pdf_display_urllist) || ($node->print_pdf_display_urllist === NULL)) {
+ $node->print_pdf_display_urllist = variable_get('print_pdf_display_urllist_'. $node->type, PRINT_TYPE_URLLIST_DEFAULT);
+ }
_print_pdf_node_conf_modify($node->nid, $node->print_pdf_display, $node->print_pdf_display_comment, $node->print_pdf_display_urllist);
}