Commit 91497c1b authored by jcnventura's avatar jcnventura

When there's no alias defined, link to print*/nid and not print*/node/nid.

parent b737242f
......@@ -383,8 +383,8 @@ function print_node_view($node, $view_mode) {
$query = print_query_string_encode($query_arr, array('q'));
if (empty($query)) $query = NULL;
if ($print_html_link_use_alias) {
$path = drupal_get_path_alias('node/' . $node->nid);
if (($print_html_link_use_alias) && ($alias = drupal_lookup_path('alias', 'node/' . $node->nid))) {
$path = $alias;
}
else {
$path = $node->nid;
......
......@@ -163,8 +163,8 @@ function print_mail_node_view($node, $view_mode) {
$query = print_query_string_encode($query_arr, array('q'));
if (empty($query)) $query = NULL;
if ($print_mail_link_use_alias) {
$path = drupal_get_path_alias('node/' . $node->nid);
if (($print_mail_link_use_alias) && ($alias = drupal_lookup_path('alias', 'node/' . $node->nid))) {
$path = $alias;
}
else {
$path = $node->nid;
......
......@@ -287,8 +287,8 @@ function print_pdf_node_view($node, $view_mode) {
$query = print_query_string_encode($query_arr, array('q'));
if (empty($query)) $query = NULL;
if ($print_pdf_link_use_alias) {
$path = drupal_get_path_alias('node/' . $node->nid);
if (($print_pdf_link_use_alias) && ($alias = drupal_lookup_path('alias', 'node/' . $node->nid))) {
$path = $alias;
}
else {
$path = $node->nid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment