summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2012-05-24 14:11:50 (GMT)
committerJoao Ventura2012-05-24 14:12:04 (GMT)
commitcb0cc35699f95ab364213d759f4abb597b73909d (patch)
tree818f47b21de8137afd9f0b40f66c01a4ec966ad9
parent8747d1bdb4c613dd0d0b26b306f5da2358dfa0f2 (diff)
Issue #684178: support node/add/{nodetype} and similar paths.6.x-1.17
-rw-r--r--print.module2
-rw-r--r--print.pages.inc2
-rw-r--r--print_mail/print_mail.module2
-rw-r--r--print_pdf/print_pdf.module2
4 files changed, 4 insertions, 4 deletions
diff --git a/print.module b/print.module
index 6539f16..02510cf 100644
--- a/print.module
+++ b/print.module
@@ -716,7 +716,7 @@ function print_insert_link($path = NULL, $node = NULL) {
}
else {
if ($path === NULL) {
- $nid = preg_replace('!^node/!', '', $_GET['q']);
+ $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']);
$path = $_GET['q'];
}
else {
diff --git a/print.pages.inc b/print.pages.inc
index b5dcd0a..ba7cc79 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -80,7 +80,7 @@ function print_controller($path, $cid = NULL, $format = PRINT_HTML_FORMAT, $teas
$path = $alias;
}
$parts = explode('/', $path);
- if (($parts[0] == 'node') && (count($parts) > 1)) {
+ if (($parts[0] == 'node') && (count($parts) > 1) && ctype_digit($parts[1])) {
array_shift($parts);
$path = implode('/', $parts);
}
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 2df0218..683148b 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -392,7 +392,7 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
}
else {
if ($path === NULL) {
- $nid = preg_replace('!^node/!', '', $_GET['q']);
+ $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']);
$path = $_GET['q'];
}
else {
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index 170ac4e..c370512 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -477,7 +477,7 @@ function print_pdf_insert_link($path = NULL, $node = NULL) {
}
else {
if ($path === NULL) {
- $nid = preg_replace('!^node/!', '', $_GET['q']);
+ $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']);
$path = $_GET['q'];
}
else {