Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
print
Commits
fd8fa980
Commit
fd8fa980
authored
Apr 19, 2012
by
jcnventura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When there's no alias defined, link to print*/nid and not print*/node/nid (part 2).
parent
6e16b6c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
print.module
print.module
+3
-3
print_mail/print_mail.module
print_mail/print_mail.module
+2
-2
print_pdf/print_pdf.module
print_pdf/print_pdf.module
+2
-2
No files found.
print.module
View file @
fd8fa980
...
...
@@ -323,7 +323,7 @@ function print_node_view_alter(&$build) {
break
;
case
2
:
$print_html_link_use_alias
=
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
);
$path
=
(
$print_html_link_use_alias
)
?
drupal_
get
_path
_
alias
(
'node/'
.
$build
[
'#node'
]
->
nid
)
:
$build
[
'#node'
]
->
nid
;
$path
=
(
$print_html_link_use_alias
&&
(
$alias
=
drupal_
lookup
_path
(
'
alias
'
,
'node/'
.
$build
[
'#node'
]
->
nid
)
))
?
$alias
:
$build
[
'#node'
]
->
nid
;
break
;
}
...
...
@@ -722,8 +722,8 @@ function print_insert_link($path = NULL, $node = NULL) {
$path
=
'book/export/html/'
.
$nid
;
}
else
{
if
(
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
))
{
$path
=
drupal_get_path_alias
(
$path
)
;
if
(
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
)
&&
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
))
)
{
$path
=
$alias
;
}
else
{
$path
=
$nid
;
...
...
print_mail/print_mail.module
View file @
fd8fa980
...
...
@@ -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
;
...
...
print_pdf/print_pdf.module
View file @
fd8fa980
...
...
@@ -522,8 +522,8 @@ function print_pdf_insert_link($path = NULL, $node = NULL) {
$path
=
'book/export/html/'
.
$nid
;
}
else
{
if
(
variable_get
(
'print_pdf_link_use_alias'
,
PRINT_PDF_LINK_USE_ALIAS_DEFAULT
))
{
$path
=
drupal_get_path_alias
(
$path
)
;
if
(
variable_get
(
'print_pdf_link_use_alias'
,
PRINT_PDF_LINK_USE_ALIAS_DEFAULT
)
&&
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
))
)
{
$path
=
$alias
;
}
else
{
$path
=
$nid
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment