Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
47bb1726
Commit
47bb1726
authored
5 years ago
by
lkmorlan
Committed by
Liam Morland
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #3060718 by Liam Morland: Make Webform default_nid work when entity_token is enabled
parent
a0809781
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fillpdf.module
+6
-2
6 additions, 2 deletions
fillpdf.module
with
6 additions
and
2 deletions
fillpdf.module
+
6
−
2
View file @
47bb1726
...
...
@@ -830,12 +830,14 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i
// If no nid is given, and Entity API is disabled, use the default nid as a
// classic node. (If Entity API is enabled, we'll handle it as an entity later
// on in this function.)
if
(
!
$
entity_
mode
&&
!
empty
(
$fillpdf_info
->
default_nid
)
&&
empty
(
$nids
)
&&
empty
(
$webform_array
))
{
if
(
empty
(
$fillpdf_info
->
default_
entity_
type
)
&&
!
empty
(
$fillpdf_info
->
default_nid
)
&&
empty
(
$nids
)
&&
empty
(
$webform_array
))
{
$default_node
=
node_load
(
$fillpdf_info
->
default_nid
);
if
(
$default_node
)
{
// Default node is a non-webform node.
if
(
empty
(
$default_node
->
webform
))
{
$context
[
'nodes'
][]
=
$default_node
;
if
(
!
$entity_mode
)
{
$context
[
'nodes'
][]
=
$default_node
;
}
}
// Default node is a webform.
else
{
...
...
@@ -845,6 +847,8 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i
'node'
=>
$default_node
,
),
);
// Since this is handled here, prevent it from being processed as an entity later.
$entity_mode
=
FALSE
;
}
}
}
...
...
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