summaryrefslogtreecommitdiffstats
path: root/print_mail
diff options
context:
space:
mode:
authorJoao Ventura2012-04-19 01:28:47 +0200
committerJoao Ventura2012-04-19 01:28:47 +0200
commitfd8fa9805f06fa92c7542432b37acf5b1c21e07d (patch)
tree39865f884f8b36a86099b79073aa18edcd2a28f4 /print_mail
parent6e16b6c5414b8bb8f481d9322fba14b50d14f8e5 (diff)
When there's no alias defined, link to print*/nid and not print*/node/nid (part 2).
Diffstat (limited to 'print_mail')
-rw-r--r--print_mail/print_mail.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 14e643e..d8c38d0 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -442,8 +442,8 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
$path = 'book/export/html/' . $nid;
}
else {
- if (variable_get('print_mail_link_use_alias', PRINT_MAIL_LINK_USE_ALIAS_DEFAULT)) {
- $path = drupal_get_path_alias($path);
+ if (variable_get('print_mail_link_use_alias', PRINT_MAIL_LINK_USE_ALIAS_DEFAULT) && ($alias = drupal_lookup_path('alias', $path))) {
+ $path = $alias;
}
else {
$path = $nid;