Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
print
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
print
Commits
fd8fa980
Commit
fd8fa980
authored
Apr 18, 2012
by
João Ventura
Browse files
Options
Downloads
Patches
Plain Diff
When there's no alias defined, link to print*/nid and not print*/node/nid (part 2).
parent
6e16b6c5
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
print.module
+3
-3
3 additions, 3 deletions
print.module
print_mail/print_mail.module
+2
-2
2 additions, 2 deletions
print_mail/print_mail.module
print_pdf/print_pdf.module
+2
-2
2 additions, 2 deletions
print_pdf/print_pdf.module
with
7 additions
and
7 deletions
print.module
+
3
−
3
View file @
fd8fa980
...
@@ -323,7 +323,7 @@ function print_node_view_alter(&$build) {
...
@@ -323,7 +323,7 @@ function print_node_view_alter(&$build) {
break
;
break
;
case
2
:
case
2
:
$print_html_link_use_alias
=
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
);
$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
;
break
;
}
}
...
@@ -722,8 +722,8 @@ function print_insert_link($path = NULL, $node = NULL) {
...
@@ -722,8 +722,8 @@ function print_insert_link($path = NULL, $node = NULL) {
$path
=
'book/export/html/'
.
$nid
;
$path
=
'book/export/html/'
.
$nid
;
}
}
else
{
else
{
if
(
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
))
{
if
(
variable_get
(
'print_html_link_use_alias'
,
PRINT_HTML_LINK_USE_ALIAS_DEFAULT
)
&&
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
))
)
{
$path
=
drupal_get_path_alias
(
$path
)
;
$path
=
$alias
;
}
}
else
{
else
{
$path
=
$nid
;
$path
=
$nid
;
...
...
This diff is collapsed.
Click to expand it.
print_mail/print_mail.module
+
2
−
2
View file @
fd8fa980
...
@@ -442,8 +442,8 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
...
@@ -442,8 +442,8 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
$path
=
'book/export/html/'
.
$nid
;
$path
=
'book/export/html/'
.
$nid
;
}
}
else
{
else
{
if
(
variable_get
(
'print_mail_link_use_alias'
,
PRINT_MAIL_LINK_USE_ALIAS_DEFAULT
))
{
if
(
variable_get
(
'print_mail_link_use_alias'
,
PRINT_MAIL_LINK_USE_ALIAS_DEFAULT
)
&&
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
))
)
{
$path
=
drupal_get_path_alias
(
$path
)
;
$path
=
$alias
;
}
}
else
{
else
{
$path
=
$nid
;
$path
=
$nid
;
...
...
This diff is collapsed.
Click to expand it.
print_pdf/print_pdf.module
+
2
−
2
View file @
fd8fa980
...
@@ -522,8 +522,8 @@ function print_pdf_insert_link($path = NULL, $node = NULL) {
...
@@ -522,8 +522,8 @@ function print_pdf_insert_link($path = NULL, $node = NULL) {
$path
=
'book/export/html/'
.
$nid
;
$path
=
'book/export/html/'
.
$nid
;
}
}
else
{
else
{
if
(
variable_get
(
'print_pdf_link_use_alias'
,
PRINT_PDF_LINK_USE_ALIAS_DEFAULT
))
{
if
(
variable_get
(
'print_pdf_link_use_alias'
,
PRINT_PDF_LINK_USE_ALIAS_DEFAULT
)
&&
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
))
)
{
$path
=
drupal_get_path_alias
(
$path
)
;
$path
=
$alias
;
}
}
else
{
else
{
$path
=
$nid
;
$path
=
$nid
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment