Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
N
node_authlink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
node_authlink
Commits
8b28c829
Commit
8b28c829
authored
Aug 22, 2018
by
akalam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generation of authlinks working
parent
8a62681d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
node_authlink.module
node_authlink.module
+3
-3
No files found.
node_authlink.module
View file @
8b28c829
...
...
@@ -116,12 +116,12 @@ function node_authlink_form_node_type_form_alter_submit(&$form, FormStateInterfa
/**
* Generate authkeys for all nodes in node type.
*/
function
node_authlink_batch_generate
(
&
$form
,
&
$form_state
)
{
function
node_authlink_batch_generate
(
&
$form
,
FormStateInterface
&
$form_state
)
{
// Load NIDs that are not in the authkeys table
$query
=
db_select
(
'node'
,
'n'
);
$query
->
leftJoin
(
'node_authlink_nodes'
,
'a'
,
'n.nid = a.nid'
);
$query
->
fields
(
'n'
,
[
'nid'
])
->
condition
(
'type'
,
$form_state
[
'values'
][
'type'
]
)
->
condition
(
'type'
,
$form_state
->
getValue
(
'type'
)
)
->
isNull
(
'authkey'
);
$nids
=
$query
->
execute
()
->
fetchCol
();
...
...
@@ -210,7 +210,7 @@ function node_authlink_get_url($node, $op = 'edit') {
}
$url
=
Url
::
fromRoute
(
$route_name
,
[
'node'
=>
1
],
[
$url
=
Url
::
fromRoute
(
$route_name
,
[
'node'
=>
$node
->
id
()
],
[
'absolute'
=>
TRUE
,
'query'
=>
[
'authkey'
=>
$node
->
authkey
],
]);
...
...
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